diff --git a/stack_using_queue.cpp b/stack_using_queue.cpp index fe5a903..1224806 100644 --- a/stack_using_queue.cpp +++ b/stack_using_queue.cpp @@ -2,6 +2,7 @@ #include #define max_size 10 using namespace std; + class queue { int *a; @@ -9,6 +10,7 @@ class queue int front; int rear; int curr_size; + public: queue() { @@ -107,14 +109,7 @@ int main() { int x,ele,ch; char c; -// queue q; - ///* -// q.enque(1); -// q.enque(2); -// q.enque(3); -// cout<>ele; s.push(ele); break; + case 2:x=s.pop(); if(x!=-1) cout<<"\n\tPOPPED ELEMENT IS:"<>c; + }while(c=='y'||c=='Y'); getch();