When you declare a derived class, an access specifier can precede each base class in the base list of the derived class. This does not alter the access attributes of the individual members of a base class as seen by the base class, but allows the derived class to restore the access attributes of the members of a base class.
You can derive classes using any of the three access specifiers:
In all cases, private members of the base class remain private. Private members of the base class cannot be used by the derived class unless friend declarations within the base class explicitly grant access to them.
You can use both a structure and a class as base classes in the base list of a derived class declaration. If the base class is declared with the keyword class, its default access specifier in the base list of a derived class is private. If the base class is declared with the keyword struct, its default access specifier in the base list of a derived class is public.
Members and friends of a class can implicitly convert a pointer to an object of that class to a pointer to either:
Access Declarations
Access Resolution
Member Access
Derivation