// Phil Ottewell's STL Course - http://www.pottsoft.com/home/stl/stl.htmlx // // Example 4.2 © Phil Ottewell 1997 // // Purpose: // Demonstrate use of queue container adaptor // ANSI C Headers #include // C++ STL Headers #include #include #ifdef _WIN32 using namespace std; #endif int main( int argc, char *argv[] ) { queue< const char * > s; // Push on stack in correct order s.push("First"); s.push("come"); s.push("first"); s.push("served"); s.push("- why"); s.push("don't"); s.push("bars"); s.push("do"); s.push("this ?"); // Pop off front of queue which preserves the order while ( !s.empty() ) { cout << s.front() << " "; s.pop(); } cout << endl; return( EXIT_SUCCESS ); }