#ifndef BASEH #define BASEH #include #include "obj.h" using namespace std; class base { obj o1; obj o2; public: base() { cout << "default construct base "; print(); cout << "\n"; } base(int initial_o1, int initial_o2): o1(initial_o1), o2(initial_o2) { cout << "construct base "; print(); cout << "\n"; } ~base() { cout << "destruct base "; print(); cout << "\n"; } void f() const {} void print() const { o1.print(); cout << ", "; o2.print(); } }; #endif