From ab22101e5f898cc4e16c36783c0952ab702371df Mon Sep 17 00:00:00 2001 From: Mohit Arora <32641304+mohitarora3@users.noreply.github.com> Date: Sat, 3 Oct 2020 13:31:58 +0000 Subject: [PATCH] Update stack_using_queue.cpp Removed the dead code --- stack_using_queue.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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();