#ifndef ANNOUNCER_H #define ANNOUNCER_H #include //for the object cout using namespace std; class announcer { private: int i; public: announcer(int init_i): i {init_i} { cout << "construct announcer " << *this << "\n"; } announcer(const announcer& another): i {another.i} { cout << "copy construct announcer " << *this << "\n"; } ~announcer() { cout << "destruct announcer " << *this << "\n"; } friend ostream& operator<<(ostream& ost, const announcer& a) { return ost << a.i; } }; #endif