资源预览内容
第1页 / 共3页
第2页 / 共3页
第3页 / 共3页
亲,该文档总共3页全部预览完了,如果喜欢就下载吧!
资源描述
#include “stdafx.h“ #include “iostream“ using namespace std; class S; class SA; class SB; class SC; class SD; S* temp; SA* sa; SB* sb; SC* sc; SD* sd; class S public: int i; virtual void getkey()=0; ;class SA:public S int i; virtual void getkey(); ; class SB:public S int i; virtual void getkey(); ; class SC:public S int i; virtual void getkey(); ; class SD:public S int i; virtual void getkey(); ; void SA:getkey() couti;switch(i) case 1: temp=sb; break; case 2: temp=sc; break; default: couti; switch(i) case 11: temp=sd; break; case 10: temp=sc; break; default: couti; switch(i) case 100: temp=sd; break; default: couti; switch(i) case 1000: temp=sa; break; case 0: exit(0); break; default: coutgetkey(); delete sa; delete sb; delete sc; delete sd; return 0;
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号