#include #include #include "stacke.h" using namespace std; stacke::~stacke() { if (size() != 0) { cerr << "stack destructed with nonzero size " << size() << "\n"; } } void stacke::_push() const { if (size() >= capacity()) { cerr << "size == " << size() << ", capacity == " << capacity() << "\n"; exit(EXIT_FAILURE); } } void stacke::_pop() const { if (size() <= 0) { cerr << "can't pop stack with size " << size() << "\n"; exit(EXIT_FAILURE); } }