// L-16 MCS 360 Wed 19 Feb 2020 : use_stl_list_as_queue.cpp

/* We show how to use a STL list as a queue. */

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

int main()
{
   list<string> q;

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

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

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

   return 0;
}
