单选题
C++
题号 #2657215
现需要对list类对象使用的逻辑运算符“==”重载,以下函数声明 是正确的。
参考答案
D
答案解析
你可能感兴趣的试题
A.c.operator++(m);
B.m=operator++(m);
C.m.operator++(m);
D.operator++(m);
class fun
{ public:
………
fun operator +=(fun );
friend fun operator ++(fun &,int);
};
class fun
{ public:
………
fun operator +=(fun );
friend fun operator ++(fun &,int);
};
A.d=operator+=(m);
B.m=operator+=(d);
C.d.operator+=(m);
D.m.operator+=(d);
A.a,b,c都必须是Com的对象
B.a,b都必须是Com的对象
C.a,c都必须是Com的对象
D.b,c都必须是Com的对象
class Com
{ ... ...
friend Com operator +(... ...);
};
class Com
{ ... ...
friend Com operator +(... ...);
};