Reputation: 1769
Can I make a function 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.
Upvotes: 1
Views: 117
Reputation: 81349
Yes, you can. The syntax for this should be obvious from the example you pointed out:
friend return_type free_function(args);
Upvotes: 4