填空题 C++
题号 #145200

下列程序的输出结果为2,请将程序补充完整。 
#include  
using namespace std; 
class Base 
{ 
public:(12)void fun( ){ cout <<1; } 
}; 
class Derived:public Base 
{ 
public: 
void fun( ) { cout <<2; } 
}; 
int main( ) 
{ 
Base *p= new Derived;  
p- >fun( ); 
delete p;  
return 0;  
} 

进入在线模考

参考答案

暂无

答案解析

virtual

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考