concept of constructor and destructor
Answers
Answered by
4
construction means making distruction means destorying something
hope it helps
hope it helps
ujjwal00086:
think before you act
Answered by
6
Short note on constructor and destructor in c++:
(i) Constructors are invoked automatically when the objects are created.
(ii) Destructors are invoked automatically when the objects are destroyed.
(i) Constructors accept arguments.
(ii) Destructors does not accept arguments.
(i) constructor can be overloaded.
(ii) Destructors cannot be overloaded.
(i) Constructors has same name as class itself.
(ii) Desturctors also has but they should be prefixed with ~ symbol.
Hope this helps!
Similar questions