
Declaring a Member Function as a Friend of Another Class
Although you can declare an entire class a friend of another class, like this: class A{ friend class B; //B has access to every member of A //..}; However, in most cases, only one or two member functions of B need such unrestricted access to A. To avoid indiscriminate access,