Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 11 Online
OpenStudy (anonymous):

what is constructor in c++?

OpenStudy (rsmith6559):

A constructor is a member function of a class that initializes an object (instance) of the class. The constructor has the same name as the class and is called automatically when an object is instantiated.

OpenStudy (anonymous):

What @rsmith6559 said. In layman's terms, it is what is called to create an instance of an object.

OpenStudy (anonymous):

they are the member fun. of a class which is created automatically within the object of a class created. it is basically use for initialization.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!