Friend Function
Functions that can access any private fields and methods of the class. They are the non-member functions that can access and manipulate the private and protected members of the class for they are declared as friends.
For example, a Linked List class may be allowed to access private members of Node.
A friend function can be:
- A global function
- A member function of another class
Related
Links to this page CS247 Lecture 2