Hello,
Is there any way of checking all elements in a queue without calling pop().
while(!q.empty()){
cout << q.front() << endl;
q.pop()
}
this is essentially what I have done.
There is a bug in my program and I'm trying to check what is wrong. I don't want to remove elements. just want to check the content of the queue.
Appreciate any help you could lend me.
drjay