// File: bad1.cpp // // Testing where the destructor gets called. // Some things you are not supposed to do. #include #include "dmc.h" using namespace std ; int main() { cout << "\n\nEntering main()\n" ; DMC *ptr ; ptr = new DMC[4] ; cout << "Do someting\n" ; delete ptr ; // should use delete[] cout << "\n\nExiting main()\n" ; }