When an object of a class is created, C++ calls the constructor
for that class. If no constructor is defined, C++ invokes a default constructor,
which allocates memory for the object, but doesn't initialize it.

Why you should define a constructor

Uninitialized member fields have garbage in them.
This creates
the possibility of a serious bug (eg, an uninitialized pointer, illegal values,
inconsistent values, ...).

Declaring a constructor

A constructor is similar to a function, but with the following differences.