下列程序的输出结果为2,请将程序补充完整。 inelude<iostream.h> using namespace std; class Bas

题目内容(请给出正确答案)
下列程序的输出结果为2,请将程序补充完整。 inelude using namespace std; class Bas

下列程序的输出结果为2,请将程序补充完整。

inelude<iostream.h>

using namespace std;

class Base

{

public:

______ void fun( ){cout<<1;}

};

class Derived: public Base

{

pbulic:

void fubn( ){cout<<2;}

};

int main( )

{Base*P=new Derived;

P→fun( );

delete P;

return 0;

}

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
更多相关问题