11.5. public, protected and private Inheritance
When deriving a class from a base class, the base class may be inherited through
private inheritance. We normally use
public inheritance in this book. Use of
protected inheritance is rare. Figure 11.16 summarizes for each type of inheritance the accessibility of base-class members in a derived class. The first column contains the base-class access specifiers.
When deriving a class with
public members of the base class become
public members of the derived class, and
protected members ...