// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <cstdlib>

#include <iostream>
#include <map>
#include <string>

using namespace std;

int main()
{
   map<int,string> MyMap;
   for(int i=0;i<20;i++)
   {
      int key = rand();
      string val = "Test";
      MyMap.insert(make_pair(key,val));
   }
   map<int,string>::iterator it;
   for(it=MyMap.begin();it!=MyMap.end();it++)
   {
      cout << it->first << " " << it->second << endl;
   }
   return 0;
}
