在派生类的构造函数调用基类指派算子不好?
C + + : Bad Form to Call Base Class Asssignment Operator in Derived Class Constructor?
派生类的构造函数基类指针,我怎么指向基类的指针?
For a derived class with a constructor that takes a base class pointer, how do I refer to the base class pointer?
在由派生类的构造函数调用时,提供基类值的初始化。
Provides initialization for base class values when called by the constructor of a derived class.
当构造、拷贝、赋值或撤销一个派生类对象时,也要构造、拷贝、赋值或撤销那些基类的子对象。
When we construct, copy, assign, or destroy an object of derived type, we also construct, copy, assign, or destroy those base-class subobjects.
在继承中,派生类接受基类的成员变量和方法。这表示继承的顺序必须在对象构造的时候被遵守。
In inheritance, the derived class receives the base class member variables and methods. This means that an order of inheritance must be followed during the construction of an object.
不可访问基类中的复制构造函数,因此无法为派生类生成复制构造函数。
A copy constructor was not accessible in a base class and was therefore not generated for a derived class.
当在派生类中重写时,调用具有给定参数的反射的方法或构造函数。
When overridden in a derived class, invokes the reflected method or constructor with the given parameters.
不可访问基类中的构造函数,因此无法为派生类生成构造函数。
A constructor was not accessible in a base class and was therefore not generated for a derived class.
派生类中的所有方法(包括类的构造函数)都必须满足该继承要求。
All methods in the derived class, including the constructor for the class, must meet the inheritance demand.
派生类中的所有方法(包括类的构造函数)都必须满足该继承要求。
All methods in the derived class, including the constructor for the class, must meet the inheritance demand.
应用推荐