高等教育 / 计算机可视化编程
应在下列程序划线处填入的正确语句是( )
#include <iostream.h>
class Base
{public:
void fun(){cout<<"Base::fun"<<ENDL;}
};
class Derived:public Base
{ void fun()
{_____________//显示调用基类的函数fun()
cout<<"Derived::fun"<<ENDL;
}
};
A、fun();
B、Base.fun();
C、Base::fun();
D、Base->fun();
#include <iostream.h>
class Base
{public:
void fun(){cout<<"Base::fun"<<ENDL;}
};
class Derived:public Base
{ void fun()
{_____________//显示调用基类的函数fun()
cout<<"Derived::fun"<<ENDL;
}
};
A、fun();
B、Base.fun();
C、Base::fun();
D、Base->fun();
参考答案: