Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Générer des valeurs aléatoires dans un ‘deque’

 deque, iterator
{filelink=15354}

 
#include <iostream>
using namespace std;
#include <cstdlib>
#include <algorithm>
#include <deque>
#include <iterator>
 
int nextLetter();
 
int main()
{
   deque< int > deq(10);
   ostream_iterator< int > output( cout, " " );
 
   generate_n( deq.begin(), 5, rand);
 
   cout << "deque:";
   copy( deq.begin(), deq.end(), output );
 
   cout << endl;
   return 0;
}

No comments yet.

Leave a Comment