// queue.cpp: Using a queue; a demonstration of the
// member functions push, pop, back, and front.
#include <iostream>
#include <list>
#include <queue>
using namespace std;

int main() {
 queue <int, list<int> > Q;
 Q.push(10); 
 Q.push(20); 
 Q.push(30);
 cout << "After pushing 10, 20 and 30:\n";
 cout << "Q.front() = " << Q.front() << endl;
 cout << "Q.back() = " << Q.back() << endl;
 Q.pop();
 cout << "After Q.pop():\n";
 cout << "Q.front() = " << Q.front() << "Q.back() = " << Q.back() << endl;
 return 0;
}
