// ********************************************************* // Header file StackP.h for the ADT stack. // Pointer-based implementation. // ********************************************************* typedef desired-type-of-stack-item stackItemType; struct stackNode; // defined in implementation file typedef stackNode* ptrType; // pointer to node 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: ptrType TopPtr; // points to top of stack }; // end class // End of header file.