#ifndef STACKTH #define STACKTH #include #include "stack.h" using namespace std; class stackt: public stack { //stack with tracing output ostream& ost; public: stackt(ostream& initial_ost): stack {}, ost {initial_ost} { ost << "stackt()\n"; } ~stackt() {ost << "~stackt()\n";} void push(int i) { stack::push(i); ost << "push(" << i << ")\n"; } int pop() { const int i {stack::pop()}; ost << "pop returns " << i << "\n"; return i; } }; #endif