Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

queue: Exemple d’une file de chaîne de caractères


{filelink=15100}

#include <iostream>
#include <string>
#include <queue>
using namespace std;
 
int main()
{
    queue<string> q;
 
    q.push( "cpp." );
    q.push( "java." );
    q.push( "php." );
 
	// Servir les éléments de la file
    while ( !q.empty() )
	{
        cout << q.front() << "mesexemples.com "<<endl;
        q.pop();
     }
 
     return 0;
}
 
/*
 
cpp.mesexemples.com
java.mesexemples.com
php.mesexemples.com
 
  */

No comments yet.

Leave a Comment