【发布时间】:2011-09-09 11:11:36
【问题描述】:
class item {
public:
item& operator=(const item &rh) {
...
...
return *this;
}
};
下面的签名错了吗?
void operator=(const item &rh);
item a, b;
a = b; // equivalent to a.operator=(b); so there is no need to return this.
【问题讨论】:
标签: c++