1. Create an object of the derived class. The constructors of the base class are preferentially called (or the member classes in the derived class );
2. If a Member class exists in the class, the constructor of the member class is called first;
3. If a base class constructor has multiple base classes, the calling sequence of the constructor appears in a class derived table.
The sequence instead of the sequence in the member initialization table;
4. Member class object constructor if there are multiple Member class objects, the calling sequence of the constructor is that the object is in the class.
The declared order rather than the order in which they appear in the member initialization table;
5. derived class Constructor
As a general rule, the derived class constructor should not directly assign values to a base class data member, but pass values.
Give the appropriate base class constructor. Otherwise, the implementation of the two classes will become more difficult to be tightly coupled (tightly coupled ).
Modify or extend the implementation of the base class correctly. (The responsibility of the base class designer is to provide a set of appropriate base class constructor)