C++ program to demonstrate the use of constructors and destructors
kw.cpp
Output
kodingwindow@kw:~$ g++ kw.cpp
kodingwindow@kw:~$ ./a.out Constructor is called Constructor is called Destructor is called Destructor is called Destructor is called kodingwindow@kw:~$
Advertisement