// @topic T51004 Miscellaneous small samples developed in class // @brief 10/04/2012 -- creating/deleting objects -- main driver #include "sensor_and_gate.h" using namespace std; int main() { Gate gate; cout << "Program runs...\n"; Sensor* ptr_sensorA = new Sensor; delete ptr_sensorA; cout << "Program finished\n"; return 0; } /* The output of this program: Sensor created Gate created Program runs... Sensor created Sensor destroyed Program finished Gate destroyed Sensor destroyed */