// 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 <iostream>
#include <map>
#include <string>

using namespace std;

struct my
{
   string s;
};

int main()
{
   map<int,struct my> m;
   struct my test;
   test.s = "abc";
   pair<int,struct my> p(123,test);
   m.insert(p);
   string s = m[123].s;
   cout << s << endl;
   return 0;
}
