// stack.cpp implements a stack abstract data type. Users of the stack can //
// perform the following operations: //
// //
// 1. void initialiseStack(Stack) - reset the stack to the empty state //
// 2. bool isEmpty(Stack) - test whether the stack is empty //
// 3. bool isFull(Stack) - test whether the stack is full //
// 4. void push(Stack, StackElement) - put another element onto the stack //
// 5. StackElement pop(Stack) - remove & return the top element //
// 6. StackElement peek(Stack) - return a copy of the top element //
// //
// Internally, this stack abstract data type is implemented as an array of //
// elements.
Comments
Leave a comment