//const.cpp #include class A { public: A( ) { cout << "A200 ";} A(int x) { cout << "A55 "; } A(double x) { cout << "A888 "; } ~A( ) { cout << "[a dead]\n"; } }; class B: public A { public: B( ) { cout << "BB22 ";} B(int x) { cout << "BB55 "; } B(double x): A( (int)(2*x)) { cout << "BB88 "; } ~B( ) { cout << "(bb dead)\n"; } }; void test( ) { B a; cout << "---in test---\n"; B b(38); cout << "===still in test ===\n"; B c(123.456); } A a; int main( ) { cout << "Welcome to here...\n"; A b(22); cout << "=== now calling test===\n"; test( ); cout << "=== return from test===\n"; return 0; } A b(49.38); ///end===/// /*********************************** C:\COURSE\CPP>tcc const.cpp Turbo C++ Version 3.00 Copyright (c) 1992 Borland International const.cpp: Turbo Link Version 5.0 Copyright (c) 1992 Borland International Available memory 4045796 C:\COURSE\CPP>const A200 A888 Welcome to here... A55 === now calling test=== A200 BB22 ---in test--- A200 BB55 ===still in test === A55 BB88 (bb dead) [a dead] (bb dead) [a dead] (bb dead) [a dead] === return from test=== [a dead] [a dead] [a dead] C:\COURSE\CPP> ****************************************/