Delete Element from Queue in C++
Advertisements
Delete any Element from Queue in 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; }
Google Advertisment