#include #include #include "announcer.h" using namespace std; //Function declarations void f(); void g(); int main() { const announcer m1 {"m1"}; f(); cout << "About to return from main.\n"; return EXIT_SUCCESS; //m1 dies here. } void f() { const announcer f1 {"f1"}; //Born in increasing order. const announcer f2 {"f2"}; const announcer f3 {"f3"}; g(); cout << "About to return from f.\n"; } //f3, f2 f1 die here, in that order void g() { const announcer a[] { //Born in increasing order. announcer {"g1"}, //Call the constructor 3 times ... announcer {"g2"}, //... to construct the 3 objects in the array announcer {"g3"} }; cout << "About to return from g.\n"; } //g3, g2, g1 die here, in that order