64,649
社区成员
发帖
与我相关
我的任务
分享
Base* fun()
{
cout << "input type: ";
int t;
cin >> t;
switch (t) {
case 0:
return new Base;
case 1:
return new Drived;
default:
return NULL;
}
Base* fun()
{
cout << "input type: ";
int t;
cin >> t;
switch (t) {
case 0:
return new Base;
case 1:
return new Drived;
default:
return NULL;
}
Base* fun()
{
cout << "input type: ";
int t;
cin >> t;
switch (t) {
case 0:
return new Base;
case 1:
return new Drived;
default:
return NULL;
}