// ConsoleApplication33.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#includeusing namespace std;#define _CRT_SECURE_NO_WARNINGSclass A{public: A(A* a) { cout << "1" << endl; } A(const A&a) { cout << "A copy" << this << endl; } A() { p = new char[20]; strcpy_s(p, 2, "a"); cout<<"A():"< << endl; } virtual ~A() { if(p!=NULL) delete[] p; cout<<" ~A():"< << endl; } int k = 4;public: char *p;};class B :public A{public: B() { p = new char[20]; strcpy_s(p, 3, "aa"); cout<<"B():" << this <