What is a constructor?

Constructor is a special member function that is used to create objects of its class The constructor name is the same as its class name.