单选题
有如下类定义;
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(AA aa)const cout<<a; )//④
;
其中的四个函数定义中正确的是( )。
A、
①
B、
②
C、
③
D、
④
【正确答案】
B
【答案解析】
提交答案
关闭