A.int getx(){…}
B.int getx(float f){…}
C.float getx(){…}
D.double getx(float f){…}
[单选题]有如下类定义: class AA { int a; public: int getRef()const{return &有如下类定义: class AA { int a; public: int getRef()const{return &a;} //① int getValue()const{return a;) //② void set(int n)const{a=n;} //③ friend void show(AAaa)const{cout<<a;} //④ }; 其中的四
[单选题]有如下类定义: class Test { private int x; public int y; public void setX (int m) {x=m;} public int getX( ) {return x;} }现用Test t=new Text();生成一个对象t,则如下语句中,错误的是( )。A.t.x=10;B.t.y=10;C.t. setX(10);D.int m=t.getX( );
[单选题]有如下类定义: class Point{ private: static int how_many; }; ______how_many=0; 要初始化Point类的静态成员how_many,下划线处应填入的内容是A.intB.static intC.int Point: :D.static int Point
[单选题]有如下类定义: class Point{ private: static int how_many; }; ______how_many=0; 要初始化Point类的静态成员how_many,在下画线处应填入的内容是A.intB.static intC.int Point::D.static int Point::
[试题]有如下类声明:class MyClass{int i;private: int j;protected:int k;public:int m, n;};其中,私有成员的数量为 ( 9 ) 。
[单选题]设有基类定义: class Cbase { private: int a; protected: int b; public: int c; }; 派生类采用何种继承方式可以使成员变量b成为自己的私有成员A.私有继承B.保护继承C.公有继承D.私有、保护、公有均可
[单选题]有以下类定义 class MyClass { private: int id; char gender; char*phone; public: MyClass():id(0),gender('#'),phone(NULL){} MyClass(int no,char ge='#',char*ph=NULL) {id=no;gender=ge;phone=ph;} }; 下列类对象定义语句中错误的是A.MyClass myObj;B.MyClass myObj(11,"13301111
[单选题]设有基类定义:class Cbase{ private:int a;protected:int b;public:int c;};派生类采用何种继承方式可以使成员变量b成为自己的私有成员A.私有继承B.保护继承C.公有继承D.私有、保护、公有均可
[单选题]设有基类定义:class Cbase{ private:int a;protected. int b;public:int c;};派生类采用何种继承方式可以使成员变量b成为自己的私有成员( )。A.私有继承B.保护继承C.公有继承D.私有、保护、公有均可
[单选题]有如下类声明: class TestClass int i; private:int j; protected:int k; public:int m,n; 其中,私有成员的数量为( )。A.0B.1C.2D.3