C + + : Bad Form to Call Base Class Asssignment Operator in Derived Class Constructor?
在派生类的构造函数调用基类指派算子不好?
The values that are used must be determined from the arguments supplied to the derived class constructor.
使用的值必须从提供给衍生类别建构函式的引数中判断。
The primary constructor in a derived class must invoke one of the parent class constructors, either the primary constructor or an auxiliary constructor.
子类的主构造函数必须调用父类的一个构造函数,无论是主构造函数或者是辅助构造函数。
For details on how each instance variable is computed, you can look at the constructor method for the class where all these values are derived.
关于如何计算每个实例变量的详细信息,可以查阅该类的构造函数方法,所有这些值都源自那里。
Now the constructor can be correctly inherited by a derived class.
现在构造器可以正确的通过继承而得到一个子类。
All methods in the derived class, including the constructor for the class, must meet the inheritance demand.
派生类中的所有方法(包括类的构造函数)都必须满足该继承要求。
For a derived class with a constructor that takes a base class pointer, how do I refer to the base class pointer?
派生类的构造函数基类指针,我怎么指向基类的指针?
If you want your derived class to set this property, you should do so within the static constructor or in other initialization routines.
如果您希望派生类设置此属性,则应该在静态构造函数或其他初始化例程中完成此工作。
When overridden in a derived class, invokes the reflected method or constructor with the given parameters.
当在派生类中重写时,调用具有给定参数的反射的方法或构造函数。
Provides initialization for base class values when called by the constructor of a derived class.
在由派生类的构造函数调用时,提供基类值的初始化。
A copy constructor was not accessible in a base class and was therefore not generated for a derived class.
不可访问基类中的复制构造函数,因此无法为派生类生成复制构造函数。
A constructor was not accessible in a base class and was therefore not generated for a derived class.
不可访问基类中的构造函数,因此无法为派生类生成构造函数。
This constructor is called by derived-class constructors to initialize the base class and is not intended for use directly from your code.
此构造函数由派生类构造函数调用以初始化基类,不适合直接在代码中使用。
The constructor for the base class must be called in the derived class.
基底类别的建构函式必须在衍生类别中呼叫。
The constructor for the base class must be called in the derived class.
基底类别的建构函式必须在衍生类别中呼叫。
应用推荐