SOURCE FILE: stackL.h
// *********************************************************
// Header file StackL.h for the ADT stack.
// ADT list implementation.
// *********************************************************
#include "ListP.h" // list operations
typedef listItemType stackItemType;
class stackClass
{
public:
// constructors and destructor:
stackClass(); // default constructor
stackClass(const stackClass& S); // copy constructor
~stackClass(); // destructor
// stack operations:
bool StackIsEmpty() const;
void Push(stackItemType NewItem, bool& Success);
void Pop(bool& Success);
void Pop(stackItemType& StackTop, bool& Success);
void GetStackTop(stackItemType& StackTop,
bool& Success) const;
private:
listClass L; // list of stack items
}; // end class
// End of header file.