經安全檢測,此網站為安全網站,請放心前往原始網址!

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

網址安全性掃描由 google 提供