#include<iostream>
using namespace std;
class A
{
public:
A() { cout << "constructing A" << endl; }
~A() { cout << "析构函数 A" << endl; }
};
class B :public A
{
public:
B() { cout << "constructing B" << endl; }
~B() { cout << "析构函数 B" << endl; }
};
class C :public B
{
public:
C() { cout << "constructing C" << endl; }
~C() { cout << "析构函数 C" << endl; }
};
int main()
{
C cl;
return 0;
}