Without using templates, how can I convert my stack class into a queue class? I can't find anything on the web.
Code:class Stack { private: int stack[100]; int top; public: Stack(): top(0) { } ~Stack() {} void push(int x) { if (top < 100) stack[top++] = x; } int pop() { if (top > 0) return stack[--top]; else return 0; } void clear() { top = 0; } int getSize() { return top; } int isEmpty() { return top == -1; } int isFull() { return top == 100; } };