In C++, constructor is a special method which is invoked automatically at the time of object creation. It is used to initialize the data members of new object generally . The constructor in C++ has the same name as class or structure.
In C++, constructor is a special method which is invoked automatically at the time of object creation. It is used to initialize the data members of new object generally . The constructor in C++ has the same name as class or structure.