1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
class A { }; class B : virtual public A { }; class C : public A { protected: B myB; }; int main() { C *obj = new C(); return 0; }