C++ (Qt)QMap <MyClass *, int> theMap; MyClass * p0 = new MyClass();theMap[p0] = 0;...MyClass * p1 = new MyClass();theMap[p1] = 1;...MyClass * p2 = new MyClass();theMap[p2] = 2;...
C++ (Qt)struct{ int Key; TBaseClass* MyClass;}TStruct; QMap<TStruct.key, TStruct>
C++ (Qt)typedef size_t TMapID;QMap <TMapID, MyValue *> theMap;QVector <MyClass *> theVec;..MyClass * p0 = new MyClass();theMap[theVec.size()] = new MyValue(); theVec.push_back(p0);