问题 单项选择题

有如下类声明:
class SAMPLE

int n;
public:
SAMPLE(int i=0):n(i)
void setValue(int n0);
;
下列关于getValue成员函数的实现中,正确的是( )。

A.SAMPLE:.setValue(int n0)n=n0;
B.void SAMPLE::setValue(int n0) n=n0;
C.void setValue(int n0) n=n0;
D.setValue(int n0) n=n0;

答案

参考答案:B

选择题
单项选择题