和有什么区别
教科书上写的是什么:
MyClass& Myclass::operator++() {
do something
return *this;
}
和
MyClass Myclass::operator++() {
do something
return *this;
}
*
意思是“指向的值” ....
是不是第二个示例将返回 this 指向的对象的副本(*this 的副本),而第一个示例将返回 *this 本身?
如果是这种情况,那么它有什么区别?提高执行时间?