This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Stack - Object oriented implementation using arrays | |
#include <iostream> | |
using namespace std; | |
#define MAX_SIZE 101 | |
class Stack | |
{ | |
private: | |
int A[MAX_SIZE]; // array to store the stack | |
int top; // variable to mark the top index of stack. |