#ifndef myBiDiCounterHPP #define myBiDiCounterHPP #include #include"MyCounter.hpp" class MyBiDiCounter : public MyCounter { public: using MyCounter::MyCounter; void decrement() { counter = counter > 0 ? counter - 1 : max; } void print() const { std::cout << counter << "/" << max << std::endl; } }; #endif