// 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 <afxwin.h>

#include <iostream>

using namespace std;

int main()
{
    CMapStringToPtr m;
    int vals[] = { 1, 2, 3, 4 };
    m["a"] = new CMapStringToPtr();
    (*(CMapStringToPtr*)m["a"])["1"] = &vals[0];
    (*(CMapStringToPtr*)m["a"])["2"] = &vals[1];
    m["b"] = new CMapStringToPtr();
    (*(CMapStringToPtr*)m["b"])["1"] = &vals[2];
    (*(CMapStringToPtr*)m["b"])["2"] = &vals[3];
    cout << *(int*)(*(CMapStringToPtr*)m["b"])["1"] << endl;
    return 0;
}
