November 2001
Beginner
1128 pages
29h 12m
English
C++ has a second means of implementing the has-a relationship—private inheritance. With private inheritance, public and protected members of the base class become private members of the derived class. This means the methods of the base class do not become part of the public interface of the derived object. They can be used, however, inside the member functions of the derived class.
Let's look at the interface topic more closely. With public inheritance, the public methods of the base class become public methods of the derived class. In short, the derived class inherits the base class interface. This is part of the is-a relationship. With private inheritance, the public methods of the base class become private methods of the ...