#ifndef COUNTEDH #define COUNTEDH class counted { static unsigned _count; int i; public: counted(int initial_i) {i = initial_i; ++_count;} counted(const counted& another) {i = another.i; ++_count;} //copy constructor ~counted() {--_count;} static unsigned count() {return _count;} }; #endif