C++ Language/Objects/Constructors/Ordering
When an object is being instantiated from a class definition, you should usually initialize its data members. Immediately after reserving enough memory to store the object, C++ will automatically call a "constructor" function to perform that data-member-initialization. You implement your constructor as a member function having the same name as the class name, optionally with parameters, having no return type at all.
When there's a hierarchy of classes, bass-class-constructors will be called before a derived-class-constructor.
Additional information about the order in which constructors get performed