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

Author:

 deque, iterator
{filelink=15354}


#include 
using namespace std;
#include 
#include 
#include 
#include 

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;
}

Leave a Reply

Your email address will not be published. Required fields are marked *