class Base { private: int a; }; // Private inheritance. class A : private Base { public: A() { a = 0; } };
Standard input is empty
prog.cpp: In constructor 'A::A()':
prog.cpp:3:6: error: 'int Base::a' is private
int a;
^
prog.cpp:10:3: error: within this context
a = 0;
^
Standard output is empty