The constructor initializes the variables(fields) of a class. The default constructor initializes to default values. Example, string to “”, integers to zero, doubles to 0.0, boolean to false an so on. When you create a constructor you’re customizing the variables initialization.
3
solved What Exactly Does A Constructor Do? (C++) [closed]