Applies to V1.0.10 and V1.1
I am using CQueue in an application and need to inspect the item at the head of the queue. I tried using CQueue::peek(), but this returns the item at the back of the queue.
[color="#00aa00"]CQueue line 112: [/color]
I have looked at CStack, and this works as I would expect, i.e. CStack::peek() returns the item at the top of the stack and leaves it there.
Similarly, should CQueue::peek() not return the item at the head of the queue - i.e. the same as you would get by calling CQueue::dequeue(), except leaving in the queue?
If I am right changing line 112 to
gives the expected result.
If I am not right a quick explanation would be appreciated.
Thanks in advance.