【发布时间】:2013-03-03 09:11:29
【问题描述】:
In the best rated answer to the question from this link,我不明白派生的赋值运算符如何从基类调用赋值运算符,即这部分代码中的这个:
Derived& operator=(const Derived& d)
{
Base::operator=(d);
additional_ = d.additional_;
return *this;
}
做什么
Base::operator=(d)
是什么意思?它有什么作用?干杯!
【问题讨论】:
标签: c++ inheritance operator-overloading assignment-operator