Delete Element from Queue in C++


Prev Tutorial Next Tutorial

Delete any Element from Queue in C++

delete date in queuein c++

In queue delete an element form Front. If you delete an element from queue value of Front will be increased by 1.

Delete element from queue in C++

	
void del()
{
int num;
if(front==-1)
{
cout<<"Queue Empty";
return;
}
else
{
num=cque.cqueue[front];
cout<<"Deleted item : "<<num;
}
if(front==rear)
{
front=-1;
}
else
front=(front+1)%3;
}

Prev Tutorial Next Tutorial

Advertisements
Download Projects