#ifndef STACKTH #define STACKTH #include #include "stack.h" using namespace std; class stackt: public virtual ::stack { public: stackt() {cout << "stackt()\n";} ~stackt() {cout << "~stackt()\n";} void _push(int i) const {cout << "push(" << i << ")\n";} void _pop(int i) const {cout << "pop(" << i << ")\n";} void push(int i) {::stack::push(i); _push(i);} int pop() {const int i = ::stack::pop(); _pop(i); return i;} }; #endif