#include // A stack datatype // Data: template class stacknode { public: T data; stacknode * link; }; template class stack { stacknode head; // Operations: public: stack(void); // pre: None // post: A stack is created. ~stack(void); // pre: None // post: The object is destroyed and its memory recovered. int full(void); // pre: None // post: result = 0 if the object is not full, 1 otherwise. int empty(void); // pre: None // post: result = 0 if the object is not empty, 1 otherwise. void push(T x); // pre: The object is not full // post: x is on top of the stack void pop(); // pre: None // post: The top element in the stack is removed T top(void); // pre: None // post: Returns the object on the top of the stack. }; #include"stack_linkedlist.cpp"