CLion debugger shows wrong information for queue
I tried this very simple program , the debugger shows queue as "1,2" -> "1" -> empty after the pop(). It is supposed to show "2,3"-> "3"-> empty..
void testQueue() {
queue<int> q;
q.push(1);
q.push(2);
q.push(3);
while(!q.empty()) {
int elem = q.front();
q.pop();
cout<<"elem = " <<elem <<endl;
}
}
Please sign in to leave a comment.