#include using namespace std; class father { public: 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:pf=new son; pf->beautiful(); pf->smart(); delete pf; default:cout<<"请输入从0到2之间的数字。"; } if (quit) { break; } } cout<<"程序结束"<