![](https://csdnimg.cn/release/download_crawler_static/87509974/bg3.jpg)
Z objZ ;
(a) void Z::fStatic(){ objZ.a = 1; }
(b) void Z::fStatic(){ a = 1; }
(c) void Z::fStatic(){ this->a = 0 ; }
(d) void Z::fStatic(){ Z::a = 0 ; }
4.若有以下类 W 说明,函数 fConst 的正确定义是( A )。
class W
{ int a;
public:
void fConst(int) const ;
};
(a) void W::fConst(int k)const { k=a; }
(b) void W::fConst(int k)const { k=a++; }
(c) void W::fConst(int k)const { cin>>a; }
(d) void W::fConst(int k)const { a=k; }
5.若有以下类 T 说明,函数 fFriend 的错误定义是( C )。
class T
{ int i;
friend void fFriend(T&,int) ;
};