#include "warning.h" void main(void) { warningCounter a, b(2,4); cout << " value of counter a should be 0\n"; cout << " value of counter a is " << a.counterIs() << endl; cout << " value of counter b should be 2\n"; cout << " value of counter b is " << b.counterIs() << endl; cout << " now we increse the counter a by 2 ... \n"; a.count(); // one a.count(); // two cout << " now we increse the counter b by 2 ... \n"; b.count(); // one b.count(); // two cout << " now the value of counter a should be 2 and b should be 4\n"; cout << " a is " << a.counterIs() << " b is " << b.counterIs() << endl; cout << " b is at its max, counting more is ignored ...\n"; b.count(); cout << " b should have 4, b is " << b.counterIs() << endl; cout << " a uncount three times, should be still 0\n"; a.unCount(); a.unCount(); a.unCount(); cout << " the value of a is " << a.counterIs() << endl; cout << " test finished... \n"; }