MFC equivalent for STL std::map
I need to associate strings to FILE pointers, and strings to unsigned long integers. Using the STL i would simply do :
map<string, FILE *> map<string, unsigned long int>
But i don't understand how to do the equivalent with MFC CMap.
I tried :
CMap<string, string &, FILE *, FILE * &> CMap<string, string *, FILE *, FILE **>
But i'm getting errors in both cases : error c2440 typecast cannot convert from std string to DWORD_PTR
Also i'm not sure to understand the logic of having 4 template parameters.
Can anyone explain me please ? Thank you.
CMap<string, unsigned long>
should work fine. The version using 4 parameters is for specialized scenarios only.