#include<iostream>
using namespace std;
class A
{ public:
A() { cout<<"A Constructor...."<<endl; }
~A() { cout<<"A Destructor..."<<endl; }
};
class B:public A
{ public:
B() { cout<<"B Constructor..."<<endl; }
~B() { cout<<"B Destructor..."<<endl; }
};
int main()
{ B b;
}
单继承的构造函数和析构函数1
猜你喜欢
转载自blog.csdn.net/u010608296/article/details/81057869
今日推荐
周排行