#ifndef __STACK_H #define __STACK_H #include "list.h" //template class Stack; //template class Stack; #pragma interface "stack.h" template class Stack { public: Stack(); // Default constructor Stack(int); // Accepts an integer value to dictate the maximum size of the stack ~Stack(); // Destructor bool push(const NodeType&); //Adds a node onto stack bool push(int value); //Adds a integer value onto stack NodeType* pop(); // Removes the top node while also making the stack 1 element smaller. NodeType* peek(); // Returns the value of the top node. int getLength(); // Returns the value of the stacks current length. bool setLength(int); // Sets the length of the current stack. private: List *info; NodeType *top; int length; }; #endif