你应该初始化引用成员在成员初始化列表。
C + + reference cannot be assigned, therefore, it must be initialized in the initialization list.
托管类中不能有本身有成员初始化列表的静态构造函数。
A managed class cannot have a static constructor that also has a member initialization list.
catch子句既可以处理从成员初始化列表中抛出的异常,也可以处理从构造函数函数体中抛出的异常。
The catch clause can handle exceptions thrown either from within the member initialization list or from within the constructor body.
构造函数的初始化列表为类的一个或多个数据成员指定初值。
A constructor initializer list specifies initial values for one or more data members of the class.
没有在初始化列表中初始化的类成员,使用它们的默认构造函数隐式初始化。
Class members that are not initialized in the initializer list are implicitly initialized by using their default constructor.
在构造函数体现执行前,用初始化列表中指定的值初始化成员。
The members are initialized to the values specified in the initializer list before the body of the constructor executes.
在构造函数体现执行前,用初始化列表中指定的值初始化成员。
The members are initialized to the values specified in the initializer list before the body of the constructor executes.
应用推荐