Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

C++: Exemple d’utilisation de ‘const_interator’ sur un ‘set’

 iterator
{filelink=15182}

 
#include <iostream>
#include <set>
#include <string>
 
using namespace std;
 
int main( )
{
 
   set<string> setStr;
 
   setStr.insert("Janvier");
   setStr.insert("Fevrier");;
   setStr.insert("Mars");
 
set<string>::const_iterator iter;
   for ( iter= setStr.begin( );
   iter != setStr.end( ); ++iter)
      cout << *iter << endl;
 
   return 0;
}

No comments yet.

Leave a Comment