A constructor is a member function with the same name as its class. For example: class X { public: X(); // constructor for class X }; Constructors are used to create, and can initialize, objects of their class type.
BrindhaPrathaban Answered question June 28, 2023
				In C++, a constructor is a special ‘MEMBER FUNCTION’ with the same name as its class that is used to initialise some valid values to an object’s data members. It is run automatically whenever a class object is generated.
Vishalini.R Answered question June 27, 2023
				