派生类赋值操做符

    赋值操做符一般与复制构造函数相似:若是派生类定义了本身的赋值操做符,函数 则该操做符必须对基类部分进行显式赋值。this     // Base :: operator = ( const Base & ) not invoked automatically  构造函数     Derived & Derived:: operator=( const Derived &rhs ) call
相关文章
相关标签/搜索