I'd like to use the STL map container to do resource instancing in my app. I want to store the name of the resource (in a string), and the resource itself in the map. I've had a look at a few tutorials (most notably
this one), and in one or two books, but I've run across a problem at the very first hurdle: declaration. I declared a map like so:
map<string, CTexture *> myTextures;
This gave me 48 compiler warnings, the first of which was
c:\program files\microsoft visual studio\vc98\include\xtree(118) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,
std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<cha
r,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basi
c_string<char,std::char_traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information
The rest are all the same (compiler warning C4786, "identifier was truncated to '255' characters in the debug information."), but each flags a different symbol as being too long. I tried declaring the map in the tutorial above, with string for both arguments, but again, I got the 48 warnings. Anyone got any idea what's going wrong?
[Edited by - iNsAn1tY on November 27, 2004 12:20:03 PM]