When are constructor and destructor called ?

When are constructor and destructor called ?
 Constructor are the the special function  having name as that of the class and doesn't have any return type.Constructor is called when the object of the class is created .We can say if the object of the class is created the constructor function is automatically called.
Destructor are also function similar to the constructor that is has same name as that of the Constructor but precised with tilde (~) sign . The destructor is called if the scope of the constructor is finished .The purpose of calling Destructor is to release the resources used by the object of the class .

1 comment:

  1. Simply desire to say your article is as surprising.

    The clearness for your post is just nice and i can suppose you are knowledgerable on this subject.
    Fine with your permission let me to snatch your RSS feed to stay
    up to date with drawing close post. Thank you a million and please continue the rewarding work.


    Review my page - League Of Immortals Cheats

    ReplyDelete

its cool