I have a priority queue which I populate. Another function will pop its first entry, calculate a departure time and push it into the priority queue. I follow these steps in the debugger and everything looks correct. Then, as soon as the priority queue gets back to the calling function everything that just happened disappears, and the priority queue is back to its original state. Can anyone explain why that is happening, and how to keep the changes I made?
> void processArrival(int currentTime, Event newEvent, priority_queue<Event> eventListPQueue, queue<Customer> bankQueue, bool tellerAvailable)
If you want the queues to actually change, pass them by reference.
You're just working on local copies, which are then lost when the function returns.
Sounds like I need to read up on exactly what the STL queue and priority queue classes are. I checked them out briefly on cplusplus.com, but what I was looking at were the member functions associated with them. They appear to be a modification of the vector class.