 |
Friendship and inheritance - C++ Tutorials
In this example, class Rectangle is a friend of class Square allowing Rectangle's member functions to access private and protected members of Square. More concretely, Rectangle accesses the member variable Square::side, which describes the side of the squ
www.cplusplus.com |
 |