//myq5.h -- inplement a queue #include using namespace std; template class MyStack { list x; public: void push(const T& y) { x.push_back(y); // tail } T top( ) { return x.front( ); // head } void pop( ) { x.pop_front( ); // drop head } bool empty( ) { return x.begin() == x.end(); } };