高手看下,麻烦了.

2024-12-20 11:31:17
推荐回答(3个)
回答1:

void get()const{return n;}
编译错误提示:
error: return-statement with a value, in function returning 'void'
改成这样:
int get()const{return n;}

回答2:

int get()const{return n;}

回答3:

void get()const{return n;}
改成
int get()const{return n;}