// L-16 MCS 360 Wed 29 Sep 2010 : use_stl_queue.cpp

/* We illustrate how basic operations of the STL queue. */

#include <iostream>
#include <string>
#include <queue>
using namespace std;

int main()
{
   queue<string> q;

   cout << "pushing A, B, and C ..." << endl;
   q.push("A"); q.push("B"); q.push("C");
   cout << "size of queue : " << q.size() << endl;
   cout << "front of queue : " << q.front() << endl;
   cout << "popping front ..." << endl;
   q.pop();

   for( ; !q.empty(); q.pop())
      cout << "front of queue : " << q.front() << endl;

   if(q.empty())
      cout << "queue is empty" << endl;
   else
      cout << "queue is not empty" << endl;

   return 0;
}

