有如下定义,其中的四个函数定义中正确的是。clas

有如下定义,其中的四个函数定义中正确的是()。

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; } //④ };
答案
B

题目信息

题号:6143
题型:单选题
难度:普通