#include #include using namespace std ; class Demo { public: int x1 ; int x2 ; Demo(int x1P , int x2P ) { x1 = x1P ; x2 = x2P ; //x1 = 5 ; //x2 = 10 ; cout << "Inside the constructor. " << endl ; } ~Demo() { cout << "Inside the destructor. " << endl ; } }; int main() { cout << "Before creating the object." << endl ; Demo* demo2ObjPtr = new Demo( 4, 6 ) ; delete ( demo2ObjPtr ) ; delete ( demo2ObjPtr ) ; cout << "End of main -----" << endl ; }