下列程序中横线处应填入的语句是()。 classBase { public: voidfun(){cout"Baseoffun"endl;}}; classDerived:publicBase { voidfun() { //显示基类的成员函数fun cout"Derivedoffun"endl; } };A.fun();B.Base.fun();C.Base::fun();D.Base-fun();
下列程序中横线处应填入的语句是()。 classBase { public: voidfun(){cout<<"Baseoffun"<<endl;}}; classDerived:publicBase { voidfun() { //显示基类的成员函数fun cout<<"Derivedoffun"<<endl; } };
A.fun();
B.Base.fun();
C.Base::fun();
D.Base->fun();
相关考题:
下列程序中画线处应填入的语句是class Base{public:void fun(){cout ”Base of fun”};class Derived:public Base{void fun(){//显示基类的成员函数funcout ”Derived of fun”};A.fun();B.Base. fun();C.Base::fun();D.Base- fun-:
请在下列程序中的横线处填写正确的语句。include using namespace std; class Base{ pu 请在下列程序中的横线处填写正确的语句。include<iostream>using namespace std;class Base{public:void fun(){cout<<“Basefun”<<endl;});class Derivde:public Base{public:void fun(){//调用基类的函数fun()cout<<“Derived fun”<<endl;}};
在下列程序画线处填入的正确语句是()。includeusing namespace std;classBase{public: 在下列程序画线处填入的正确语句是( )。 #include <iostream> using namespace std; class Base { public: void fun() { cout<<"Base::fun",<<end1; } }; class Derived:public Base { void fun() { ______________ //显式调A.fun();B.Base.fun();C.Base::fun();D.Base->fun();
下列程序中下画线处应填入的语句是class Base{public:void fun( ) {cout < < "Baseoffun" < < endl;}};class Derived:public Base{void fun( ){______//显示基类的成员函数funcout < < "Derived of fun" < < endl;}};A.fun( ) ;B.Base. fun( ) ;C.Base: :fun( ) ;D.Base->fun( ) ;
下列程序中画线处应填入的语句是 class Base { public: void fun( ){cout<<"Base of fun"<<end1;} }; class Derived:public Base { void fun( ) { ______//显示基类的成员函数fun cout<A.fun( );B.Base.fun( );C.Base: :fun( );D.Base->fun( );
下列程序中画线处应填入的语句是 class Base { public: void fun(){cout<<"Base of fun"<<end1:} }; class Derived:public Base { void fun() { _______//显示基类的成员函数fun cout<<"Derived of fun"<<end1; } };A.fun();B.Base.fun();C.Base∷fun();D.Base- >fun();
下列程序中横线处应填入的语句是( )。 Class Base { public: roid fun(){cout<<“Base of fun”<<endl;) }; class Derived:public Base { void fun() { //显示基类的成员函数fun cout<<“Derived Of fun”<<endl; } };A.fun();B.Base.fun();C.Base::fun();D.Base->fun();
请在下列程序的横线处填写正确的语句。include using namespace std; class Base{ publ 请在下列程序的横线处填写正确的语句。include<iostream>using namespace std;class Base{public:void fun(){cout<<"Base fun"<<endl;}};class Derivde:public Base{public:void 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();