STL library, or me? [Resolved]

This topic is 5047 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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]

Share on other sites
Fairly standard warnings with VC6, you can turn them off via

#pragma warning( disable : 4786 )

at the top of each source file that generates these. They are nothing to worry about.

Share on other sites
Excellent. Thanks. Consider yourself rated...

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5
frob
12

• 9
• 19
• 11
• 9
• 17
• Forum Statistics

• Total Topics
632605
• Total Posts
3007372

×