In my last article I showed you how to control horizontal access between objects by using a combination of access specifiers and friend functions. By controlling horizontal access between objects you can limit the level of access one class of objects has to another. You can further refine object behavior by defining vertical access between classes.
Vertical access is that level of access granted between classes in a class inheritance hierarchy.
Through the use of access specifiers, a base class defines what functions and attributes will be horizontally accessible by other objects as well as what functions and attributes will be inherited by derived classes. Additionally, by using access specifiers in an inheritance specification, derived classes can further define which functions and attributes inherited from the base class will be made available to other derived classes farther down the inheritance chain. This behavior makes public inheritance the preferred form of inheritance. Inheritance Sometimes, however, you will want your derived classes to behave somewhat differently from their base classes. Private inheritance Private inheritance offers further inheritance control by making all members inherited from a base class private to the derived class.