A.4
B.3
C.2
D.1
[单选题]有如下类声明: class MyBASE { int k: public; void set(int n){k=n;} int get() const{return k;} }; class MyDERIVED: protected MyBASE { protected: int j; public: void set(int m, int n){MyBASE::set(m);j=n;} int get() const{return MyBASE::get()+j;} }; 则类MyDERIVE
[单选题]有如下类声明: class MyBASE { int k; public: void set(int n){k=n;} int get()const{return k;} }; class MyDERIVED:protected MyBASE { protected: int j; public: void set(int m, int n) {MyBASE::set(m);j=n;} int get()const{return MyBASE::get()+j;} }; 则类MyDERIVED中
[单选题]有如下类声明: class MyBASE{ int k; public: void set(int n){k=n;} int get( )const{return k;} }; class MyDERIVED:protected MyBASE{ protected: intj; public: void set(int m,int n){MyBASE::set(m);j=n;} int get( )const{return MyBASE::get( )+j;} }; 则类MyDERIVED中保护
[单选题]有如下类声明: class MyBASE { int k; public: void set(int n){k=n;} int get()const{return k;} }; class MyDERIVED:protected MyBASE { protected: int j: public: void set(int m,int n){MyBASE::set(m);j=n;} int get()const{return MyBASE::get()+j;} }; 则类MyDERIVED中保护
[单选题]有如下类声明: class MyBASE { int k; public: void set(int n) {k=n;} int get()const{return k;} }; class MyDERIVED:protected MyBASE { protected. int j; public: void set(int m,int n){MyBASE::set(m);j=n;} int get()const{return MyBASE::get()+j;} }; 则类MyDERIVED中保
[单选题]有如下类定义: class MyBase{ int k; public: MyBase(int n=0):k(n){} int value( )const{return k;} }; class MyDerived:MyBase{ int j; public: MyDerived(int i):j(i){} int getK( )eonst{return k;} int getJ( )const{return j;} }; 编译时发现有一处语法错误,对这个错误最准确的描述是A.函数getK试图访
[单选题]( 31 ) 有如下类定义 :class MyBase{int k;public:MyBase(int n=0):k(n){ }int value( )const{ return k;}};class MyDerived: MyBase{int j;public:MyDerived(int i): j(i) {}int getK( )const{ return k; }int getJ( )const{ return j; }};编译时发现有一处语法错误 , 对这个错误最准确的描述是A. )函数
[单选题]有如下类定义: class MyBase { int k; public: MyBase(int n=0):k(n) { } int value( )const{ return k;} }; class MyDerived: MyBase { intj; public: MyDerived(int i): j(i) {} int getK( )const{ return k; } int getJ( )const{ return j; } }; 编译时发现有一处语法错误,对这个错误最准确的描述是
[单选题]有如下类声明: class XA { int x; public: XA(int n){x=n;} }; class XB:public XA { int y; public: XB(int a,int b); }; 在构造函数XB的下列定义中,正确的是A.XB::XB(int a,int b):x(a),y(b){}B.XB::XB(int a,int b):XA(a),y(b){}C.XB::XB(int a,int b):x(a),XB(b){}D.XB::XB(int a,int b):
[单选题]有如下类声明:class XA{int x;public:XA(int U)}x=n;}};class XB:public XA{int y;public:XB(int a,int B) ;};在构造函数XB的下列定义中,正确的是A.XB::XB(int a,int B) :x(A) ,y(B) {}B.XB::xB(int a,int B) :XA(A) ,y(B) {}C.XB::XB(int a,int B) :x(A) ,XB(B) {}D.XB::XB(int a,int B) :XA