#ifndef GRANDPRIVATELYDERIVED_H #define GRANDPRIVATELYDERIVED_H #include "PrivatelyDerived.h" class GrandPrivatelyDerived: public PrivatelyDerived{ // void print_one(); not a member // void print_two(); not a member // void print_three(); not a member public: virtual void print(){ // Regardless of public/protected/private inheritance // print_one(); // Private in Base. So only accessible by Base and its friends. // print_two(); // Protected in Base, so accessible by Base, its children, and its friends // print_three(); // Public in Base, so accessible by everyone } }; #endif // GRANDPRIVATELYDERIVED_H