符合&继承关系下的构造和析构
继承关系下构造析构顺序#include<iostream>
using namespace std;
class Base
{
public:
Base(){
cout << "Base ctor ..." << endl;
}
virtual ~Base(){
cout << "Base dtor ..." << endl;
}
};
class Derived:public Base
{
public:
Derived(){
cout << "Derived cto......