"""
Classes control object initialization by defining one or more special member functions known as contstructors. The job of a constructor is to initialize the data members of a class object. A constructor is run whenever an object of a class type is created.
....
Constructors have the same name as the class. Unlike other functions, constructor have no return type. Like other functions, constructors have a ( possibly empty) parameter list and a (possibly empty) function body. A class can have multiple constructors. Like any other overloaded function, the constructors must differ from each other in the number or types of their parameters.
Unlike other member functions, constructors may not be declared as const. When we create a const object of a class type, the object does not assume its "constness" until after the constructor completes the object's initialization. Thus, constructors can write to const objects during their construction.
"""
The synthesized default constructor:
The compiler-generated constructor is known as the synthesized default constructor. For most classes, this synthesized constructor initializes each data member of the class as follows:
* If there is an in-class initializer, use it to initialize the member.
* Otherwise, default-initialize the member.
"""
Some Classes cannot relay on the synthesized default constructor:
The most common reason that a class must define its own default constructor is that the compiler generates the default for us only if we do not define any other constructors for the class. If we define any constructors, the class willl not have a default constructor unless we define that constructor ourselves. The basis for this rule is that if a class requires control to initialize an object in one case, then the class is likely to require control in all cases.
A second reason to define the default constructor is that for some classes, the synthesized default constructor does the wrong thing. Remember that objects of built-in or compound type (such as arrays and pointers) that are defined inside a block have undefined value when they are default initialized. The same rule applies to members of built-in type that are default initialized. therefore, classes that have members of built-in type or compound type should ordinarily either initialize those members inside the class or define their own version of the default constructor. Otherwise, users could create objects with members that have undefined value.
A third reason that some classes must define their own default constructor is that sometimes the compiler is unable to synthesize one. For example, if a class has a member that has a class type, and that class doesn't have a default constructor, then the compiler can't initialize that member. For such classes, we must define our own version of the default constructor. Otherwise, the class will not have a usable default constructor. ...
"""
(TBD)