Initialize a Queue Empty
Posted: Fri Jul 27, 2007 11:16 am
suppose i have declared :
queue<int> Q;
I want this Q empty at the beginning of each interation:
t=0;
while(t--)
{
//here I need the Queue empty
// here are oprations with that Q which may leave the queue un-empty at the end
}
what should I do to make my Q empty each time ??
Thanks in advance
queue<int> Q;
I want this Q empty at the beginning of each interation:
t=0;
while(t--)
{
//here I need the Queue empty
// here are oprations with that Q which may leave the queue un-empty at the end
}
what should I do to make my Q empty each time ??
Thanks in advance