开发者

friend function of a class

开发者 https://www.devze.com 2023-04-11 21:32 出处:网络
Can I make a funct开发者_JAVA百科ion that is not member of any class be a friend of a class?If so could someone point me out to the syntax? I used thispage as reference .On that it only has a function

Can I make a funct开发者_JAVA百科ion that is not member of any class be a friend of a class?If so could someone point me out to the syntax? I used this page as reference .On that it only has a function that is part of another class being made a friend.


Yes, you can. The syntax for this should be obvious from the example you pointed out:

friend return_type free_function(args);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号