suppose a class has private data members but the setters and getters are in public scope. If you inherit from this class, you can still call those setters and getters -- ena
It depends on the inheritance type. If you inherit privately, then the derived class does NOT have access to the Base's private members.
Access public protected private
-----------------------------------------------------------
members of the same class yes yes yes
members of derived classes yes yes no
not members yes no no