网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

请将下列类定义补充完整。

class Base{public:void fun( ){cout<<"Base::fun"<<endl;}};

class Derived:public Base

{

public:

void fun( ){

______//显式调用基类的fun函数

cout<<"Derived::fun"<<endl;

}

};


参考答案

更多 “ 请将下列类定义补充完整。class Base{public:void fun( ){cout<<"Base::fun"<<endl;}};class Derived:public Base{public:void fun( ){______//显式调用基类的fun函数cout<<"Derived::fun"<<endl;}}; ” 相关考题
考题 请将下列类定义补充完整,横线处应填加语句______。class TestClass{public:void fun(){cout<<"Base::fun"<<end1;}};class TestClass1:public TestClass{public:voidfun(){______;//显示调用基类的fun函数cout<<"TestClass1::fun"<<end1;}};

考题 请将下列类定义补充完整。class Base{public:void fun(){tout<<"Base::fun"<<endl;}};class Derived:public Base{public:void fun(){______//显示调用基类的fun函数cout<<"Derived::fun"<<endl;};

考题 请将下列类定义补充完整class Base{public: void fun(){cout<<"Base::fun"<<end1;}};class Derived:public Base{public:void fun(){______//显式调用基类的fun函数cout<<"Derived::fun"<<end1;}};

考题 下面程序的输出结果为:Base:: fun,请将程序补充完整。include class Base{public: 【】 下面程序的输出结果为:Base:: fun,请将程序补充完整。include <iostream.h>class Base{public:【 】 fun(){cout<<"Base::fun"<<end1:}class Derived : public Base{public:【 】 fun(){ cout<<"Derived::fun"<<end1; }};int main(){Base a,*pb;Derived b;pb = b;pb->fun();return 0;}

考题 请将下列类定义补充完整。class Base{public:void fun(){cout<<"Base::fun"<<end;}};class Derived:public Base{public:void fun(){【 】//显式调用基类的fun函数cout<<"Derived::fun"<<endl;}};

考题 在下列横线处应添加的语句是( )。 class Base{public:void fun(){cout<<"Base::fun"<<end1;}}; class: Derived: public Base { public: void fun() { ______//显示调用基类的fun函数 cout<<"Derived::fun"<<end1; } };A.Derived::funB.Base::fun();C.Pubic::funD.fun();

考题 请将下列类定义补充完整。class Base{public:void fun(){cout<<"Base∷fun"<<end1;}};c1ass DehVed:public Base{public:void fun(){______ ∥显式调用基类的fun函数cout<<"Derived∷fun"<<endl;}};

考题 8、应在下列程序划线处填入的正确语句是()。 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();

考题 下列程序划线处应填入的正确语句是()。 class Base { public: void fun(){ cout<<"Base::fun"<<endl; } }; class Derived:public Base { public: void fun() { _____________ //显示调用基类的函数fun() cout<<"Derived::fun"<<endl; } };A.fun();B.Base.fun();C.Base::fun();D.Base->fun();