Queue of string: push(), empty(), front(), pop()
#include <iostream>
#include <string>
#include <queue>
using namespace std;
int main()
{
queue<string> q;
q.push( "A" );
q.push( "B" );
q.push( "C" );
while ( !q.empty() ) {
cout << q.front() << " ";
q.pop();
}
return 0;
}
Related examples in the same category