#pragma once #include #include "Node.h" class Stack { public: // Constructor and destructor // Default constructor Stack(); // Constructor that sets size of stack Stack(int n); // Copy constructor Stack(const Stack & st); // Destructor ~Stack(); // Overloaded assignment operator Stack& operator=(const Stack & st); // Mutators //PRE: Stack is not full //PARAM: value = value to be inserted //POST: value is inserted at the top of the stack void push(int value); //PRE: Stack is not empty //POST: removes and returns value at the top of the stack int pop(); // Accessor //PRE: Stack is not empty //POST: returns value at the top of the stack int peek() const; //PRE: //POST: returns true if stack is empty, otherwise false bool empty() const; //PRE: //POST: prints the contents of the stack from top to bottom void print() const; private: // Array version /* int* arr; int top; int arrSize; void copyStack(const Stack & st); */ // Linked List version ///* Node* top; void deleteStack(); void copyStack(const Stack & st); //*/ };