开发者

std::map crappy chars only in release mode

开发者 https://www.devze.com 2023-01-31 02:24 出处:网络
I have an std::map as parameter for an function and in Debug Mode (VS2008) the map have the correct keys and values, but when I start the program in Release there are crappy chars in to the map!

I have an std::map as parameter for an function and in Debug Mode (VS2008) the map have the correct keys and values, but when I start the program in Release there are crappy chars in to the map!

Code dump:

    std::map<CString, CString> libVersions;
    ... // fill values 
    utilFunctions->Function(&libVersions))

    bool UtilityFunctions::Function(std::map<CString,CString> *dllMapData)
    {
       ...
       map<CString,CString>::iterator it;

       for(it=dllMapData->begin(); it!=dllMapData->end(); it++)
       {  
          ...
       开发者_JAVA技巧}
       ...
    }

Any ideas why this code is not functional in Release mode???

Thanks and greets


My guess is that in release you are still compiling against the debug CRT and don't have _DEBUG defined (or vice versa).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号