Constructor and destructor ppt ,constructor overloading in c++ , types of constructor in c++ constructor destructor c++ , copy constructor in c++ , ,difference between constructor and destructor in c++


Constructor and destructor ppt

Constructor

A class constructor is a special member function of a class that is executed whenever we create new objects of that class.
A constructor will have exact same name as the class and it does not have any return type at all, not even void. Constructors
can be very useful for setting initial values for certain member variables.

Constructor destructor c++ , copy constructor in c++ 
Destructor

The Class Destructor
A destructor is a special member function of a class that is executed whenever an object of it's class goes out of scope or whenever the 
delete expression is applied to a pointer to the object of that class.
constructor destructor c++ , copy constructor in c++ ,  ,difference between constructor and destructor in c++  

A destructor will have exact same name as the class prefixed with a tilde (~) and it can neither return a value nor can it take any parameters. 
Destructor can be very useful for releasing resources before coming out of the program like closing files, releasing memories etc.


SHARE

Vaibhav Srivastava

Hi. I’m Vaibhav Srivastava Designer of Blog I’m Creative Art Director, Web Designer, Interaction Designer,Web Developer. Inspired to make things looks better.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment