Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
#include
#include
using namespace std; int main() { // Create a queue of strings queue
cars; // Add elements to the queue cars.push("Volvo"); cars.push("BMW"); cars.push("Ford"); cars.push("Mazda"); // Access the front element (first and oldest) cout << cars.front() << "\n"; // Access the back element (last and newest) cout << cars.back() << "\n"; return 0; }
Volvo
Mazda