Mega Code Archive
Categories
/
C++ Tutorial
/
Development
Object in existence after deletion
#include
class MyClass { static int total; public: MyClass() { total++; } ~MyClass() { total--; } int gettotal() { return total; } }; int MyClass::total=0; main() { MyClass o1,o2,o3; cout<