D Q, N Q
D Q, N Q
#include<string>
#define size 10
class BBQ
private:
int pointer;
string x[size];
public:
BBQ()//constructor
pointer=10;
void display()
if (a=="")
cout<<"[ ]"<<endl;
}
else
cout<<"Enqueuing "<<num<<".."<<endl;
string n=to_string(num);
if (pointer<=0)
cout<<"Queue is Full!"<<endl;
else
pointer--;
x[j]=x[j+1];
}
x[9]=n;
void deQueue()
if (pointer==10)
cout<<"Dequeuing.."<<endl;
cout<<"Queue is Empty!"<<endl;
else
// x[pointer]="";
cout<<"Dequeuing "<<x[9]<<".."<<endl;
// x[pointer]="";
pointer++;
if (i==0)
x[i]="";
else
{
x[i]=x[i-1];
int input(string e)
int num;
bool r=true;
while (r==true)
if (!(cin>>num))
cin.clear();
cin.ignore();
else
r=false;
}
return num;
void choice()
};
int main()
int john,choice;
bool end=true;
while (end==true)
q.display();
q.choice();
choice=q.input("Choice");
switch (choice)
case 1:
john=q.input("Number to Enqueue");
q.enQueue(john);
break;
case 2:
q.deQueue();
break;
case 3:
cout<<"Good Bye!";
end=false;
break;
default: