class GrandParent{ }; class Father : virtual public GrandParent{ }; class Mother : virtual public GrandParent{ }; class Child : public Father, public Mother{ };
int main() { GrandParent *gpp; Father *fap, fa; Mother *mop, mo; Child ch;
>>* struct V { int vm; virtual ~V() {} }; struct A : public virtual V { int am; }; struct B : private virtual V { int bm; }; struct C : public A, public B { int cm; };
class GrandParent{ public: virtual ~GrandParent(){} }; class Father : virtual public GrandParent{ }; class Mother : virtual public GrandParent{ }; class Child : public Father, public Mother{ };
int main() { GrandParent *gpp; Father *fap, fa; Mother *mop, mo; Child *chp, ch;
class GrandParent{ public: virtual ~GrandParent(){} }; class Father : virtual public GrandParent{ }; class Mother : virtual public GrandParent{ }; class Child : public Father, public Mother{ };
int main() { GrandParent *gpp; Father *fap, fa; Mother *mop, mo; Child *chp, ch;