struct A { void foo() { }; }; struct B { private: void foo() { }; }; struct C : public A, public B { }; int main() { C c; c.foo(); return 0; }
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:17:6: error: request for member 'foo' is ambiguous prog.cpp:9:9: error: candidates are: void B::foo() prog.cpp:3:9: error: void A::foo()
Standard output is empty