#ifndef PRIVATELYDERIVED_H #define PRIVATELYDERIVED_H #include "base.h" class PrivatelyDerived: private Base{ // void print_one(); not a member // void print_two(); private member // void print_three(); private 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 // PRIVATELYDERIVED_H