Chapter 5 C-- Queues.pptx
Chapter 5 C-- Queues.pptx
Chapter 5
C++ Queues
This will remove the front element (the first and oldest
element that was added to the queue):
Example
// Create a queue of strings
queue<string> cars;
Example
cout << cars.size();
Check if the Queue is Empty
queue<string> cars;
cars.push("Volvo");
cars.push("BMW");
cars.push("Ford");
cars.push("Mazda");