#include class Base { public: int mPublic; private: int mPrivate; protected: int mProtected; public: int get_mPrivate() {return mPrivate;} int get_mProtected() {return mProtected;} Base(int pub, int pri, int pro) { mPublic = pub; mPrivate = pri; mProtected = pro; } }; class Pub: public Base { public: int mPublic; private: int mPrivate; protected: int mProtected; public: int get_mPrivate() {return mPrivate;} int get_mProtected() {return mProtected;} Pub(int a, int b, int c, int pub, int pri, int pro) : Base(a, b, c) { mPublic = pub; mPrivate = pri; mProtected = pro; } }; class Pri: private Base { public: int mPublic; private: int mPrivate; protected: int mProtected; public: int get_mPrivate() {return mPrivate;} int get_mProtected() {return mProtected;} Pri(int a, int b, int c, int pub, int pri, int pro) : Base(a, b, c) { mPublic = pub; mPrivate = pri; mProtected = pro; } }; class Pro: protected Base { public: int mPublic; private: int mPrivate; protected: int mProtected; public: int get_mPrivate() {return mPrivate;} int get_mProtected() {return mProtected;} Pro(int a, int b, int c, int pub, int pri, int pro) : Base(a, b, c) { mPublic = pub; mPrivate = pri; mProtected = pro; } }; int main() { Base cBase(1,2,3); Pub cPub(1,2,3,4,5,6); Display(cPub); Display(cBase); return 0; }