开发者

friend function of a class

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜