#ifndef COUNTED_H #define COUNTED_H class counted { static int n; public: counted() {++n;} counted(const counted& another) {++n;} ~counted() {--n;} static int count() {return n;} //no invisible argument }; #endif