Protected derivation
In addition to doing private and public derivations, you may also do a protected derivation. In this situation :
- The private members inherited from the base class are inaccessible to new member functions in the derived class.
(this is exactly same as if a private or public derivation has occurred.)
- The protected members inherited from the base class have protected access privilege.
- The public members inherited from the base class have protected have protected access.
Therefore, the only difference among a public and a protected derivation is how the public members of the parent class are inherited. It is unlikely that you will ever have occasion to do this type of derivation.