// Global Objects! #include class A { public: A(); ~A(); }; A::A() { cout << "Hello inside A()" << endl; } A::~A() { cout << "Goodbye from A()" << endl; } class B : public A { public: B(); ~B(); }; B::B() { cout << "Hello inside B()" << endl; } B::~B() { cout << "Goodbye from B()" << endl; } class C : public B { public: C(); ~C(); }; C::C() { cout << "Hello inside C()" << endl; } C::~C() { cout << "Goodbye from C()" << endl; } C theApp; int main( int argc, char *argv[] ) { cout << "*** Finally, we are inside main() ****" << endl; cout << "*** Leaving main()! goodbye! ****" << endl; return 0; }