Can any one tell me the difference between constructor and destructor in C++
Answers
Answered by
0
Constructor is used to initialize the instance of a class. Destructor destroys the objects when they are no longer needed. Constructor is Called when new instance of a class is created. Destructor is called when instance of a class is deleted or released.
Answered by
0
Constructor is used to initialize the instance of a class. Destructor destroys the objects when they are no longer needed. Constructor is Called when new instance of a class is created. Destructor is called when instance of a class is deleted or released.
I hope this helps you.
I hope this helps you.
Similar questions