#include using namespace std; class father { public: father(){cout<<"构造father\n";} void smart() { cout<<"父亲很聪明\n"; } //virtual void beautiful(){} virtual ~father(){cout<<"析构father"<>choice; switch(choice) { case 0:quit=true; break; case 1:pf=new father; // pf->beautiful(); break; case 2:pm=new son; pm->beautiful(); pm->smart(); delete pm; default:cout<<"请输入从0到2之间的数字。"; } if (quit) { break; } } cout<<"程序结束"<