当前位置:在线题库搜索>[单选题]有如下类定义: class Test { public: Test(){a=0;C=0;t //① int f(int A) const{this->a=a;} //② static int g( ){return a;} //③ void h(int B) {Test::b=b;}; //④ private: int a; static int b; const int c; }; int Test::b=0: 在标注号码的行中,能被正确编译的是的答案是什么?

问题:

[单选题]有如下类定义: class Test { public: Test(){a=0;C=0;t //① int f(int A) const{this->a=a;} //② static int g( ){return a;} //③ void h(int B) {Test::b=b;}; //④ private: int a; static int b; const int c; }; int Test::b=0: 在标注号码的行中,能被正确编译的是

A、①
B、②
C、③
D、④

参考答案: D

相关内容