A constructor is a member function of a class which initializes objects of a class. In C++, Constructor is automatically called when object(instance of class) is created it is considered to be a special member function of the class.
Read this article to understand constructor in C++ in depth
Have a doubt or thought? Join the discussion now
This is a companion discussion topic for the original entry at https://iq.opengenus.org/constructor-cpp/