📅  最后修改于: 2022-03-11 14:44:55.099000             🧑  作者: Mango
MyClass& MyClass::operator=(const MyClass &rhs) {
// Only do assignment if RHS is a different object from this.
if (this != &rhs) {
... // Deallocate, allocate new space, copy values...
}
return *this;
}