#include <iostream> using namespace std; class A{ }; class B : private A{ }; int main() { A* a = new B(); return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:12:15: error: ‘A’ is an inaccessible base of ‘B’ A* a = new B(); ^
Standard output is empty