+ 3
What is the difference between constructor and destructor??
6 ответов
+ 4
constructor is used to initialize the instance of class as he said. and destructor is when the object is deleted or destroyed which is no longer in needed
+ 2
this is not an exact answer
+ 2
Constructor is a special member function whose task is to initialise an object of it's class.
&
Destructor is a special member function whose task is to destroy the object created by constructor.
Which gets called automatically when program ends.
- 1
constructor is used when we want to execute some fuction after runtime...