Queue: push and pop
#include <iostream> #include <string> #include <queue> using namespace std; int main() { queue<string> queueObject; queueObject.push( "www." ); queueObject.push( "java." ); queueObject.push( "com" ); while ( !queueObject.empty() ) { cout << queueObject.front() << " "; queueObject.pop(); } return 0; }