单项选择题
有如下类的定义。空格处的语句是( )。
class MyClass
____________ int x, y;
public:
MyClass(int a=0,int b=0)
x=a;
y=b;
static void change()
x-=10;
y-=10;
;
A.static
B.const
C.private
D.不需要填入内容
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
若有以下程序: #include <iostream> using namespace std; class Base int x; protected: int y; public: int z; void setx(int i) x=i; int getx ( ) return x; ; class Inherit : private Base private: int m; public: int p; void setvalue(int a,int b,int c, int d) setx(
A.;
&n
点击查看答案&解析
单项选择题
已知枚举类型定义语句为: enum Token NAME,NUMBER,PLUS=5,MINUS,PRINT=10; 则下列说法中,错误的是( )。
A.枚举常量NAME的值为1
B.枚举常量NUMBER的值为1
C.枚举常量MINUS的值为6
D.枚举常量PRINT的值为10
点击查看答案&解析
相关试题
有以下程序: #include <iostream> u...
类 Contain 的定义如下: class Contai...
以下程序段有( )处错误。 #include ...
有以下程序: #include <iostream> u...
以下程序执行后的输出结果是( )。 #in...