#ifndef COUNTEDH #define COUNTEDH class counted { int i; public: static unsigned _count; //data member temporarily public for simplicity counted(int initial_i) {i = initial_i; ++_count;} ~counted() {--_count;} }; #endif