Importance of constructors Constructors are used to initialize the objects of the class with initial values . Constructors are invoked automatically when the objects are created. Constructors can have default parameters. If constructor is not declared for a class , the C++ compiler generates a default constructor.