#include <stdio.h> class A { public: A() { printf("A"); } ~A() { printf("deA"); } }; class B { public: B() { printf("B"); } ~B() { printf("deB"); } }; class C : public A, public B { public: C() { printf("C"); } ~C() { printf("deC"); } }; int main() { A *a = new C(); delete a; return 0; }