Order of Construction

For derived classes and classes that have class-type member data, the order in which construction occurs helps you understand what portions of the object you can use in any given constructor.

Construction and Inheritance

An object of derived type is constructed from the base class to the derived class by calling the constructors for each class in order. Each class's constructor can rely on its base class being completely constructed.

For a complete description of initialization, including the order of initialization, see “Initializing Bases and Members”.

Construction and Composed Classes

Classes that contain class-type data members are called “composed classes.” When an object of a composed class type is created, the constructors for the contained classes are called before the class's own constructor.

For a more information about this kind of initialization, see “Initializing Bases and Members”.