Initialization Using Special Member Functions

This section describes initialization using special member functions. It expands on the following discussions of initialization:

The default method of initialization is to perform a bit-for-bit copy from the initializer into the object to be initialized. This technique is applicable only to:

Classes can specify more refined initialization by defining constructor functions. (For more information about declaring such functions, see Constructors.) If an object is of a class type that has a constructor, the object must be initialized, or there must be a default constructor. Objects that are not specifically initialized invoke the class’s default constructor.