Here's the output I get after making the corrections I suggested to you:
Code:
one
4
two
4
three
4
four
4
three
8
four
8
five
8
six
8
seven
8
eight
8
seven
8
eight
8
nine
11
ten
11
eleven
11
which is exactly what your main() calls for. The numbers don't correspond to the node labels because you aren't printing nodeIDs, you're printing mNodeCounter which is always the ID of the LAST node added to the queue. If you want each nodeID, change printList() to print temp->getID instead.
Your QueueItem constructor, and Queue::remove(), Queue::eraseList() are all OK. So your printList() must still be bad (unless you changed & messed up something else).