struct A { void foo() {} }; struct B :private A { }; int main() { B b; b.foo(); }
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:2:10: error: 'void A::foo()' is inaccessible prog.cpp:10:10: error: within this context prog.cpp:10:10: error: 'A' is not an accessible base of 'B'
Standard output is empty