nEven though inheritance hierarchies allow derived classes to inherit members from their base classes, it does not mean that those members will be accessible within a derived class.
nThis is because members within a hierarchy have their own visibility.
nAs we have seen, public
members of a base class are visible
and fully accessible by classes derived from them. And, data and member functions in the private section are only available to the class in which they
are defined. They are not
accessible to any other class (with the
exception of friends).