#include using namespace std; class Loud { public: Loud(char c) : flag(c) { cout << "ctor " << flag << '\n'; } ~Loud() { cout << "dtor " << flag << '\n'; } const char flag; }; Loud a('a'); // Create some evil global variables so that the // compiler can’t figure out that we’re dividing by zero. int zero = 0; int result; void foo() { Loud b('b'); result = 1/zero; } int main() { Loud c('c'); foo(); Loud d('d'); return 0; }