Archived

This topic is now archived and is closed to further replies.

STL map

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

What''s wrong with this? #include <string> #include <map> #include <iostream> using namespace std; void main() { map myMap; myMap["test"] = 167; cout << myMap["test"] << endl; } It runs fine but when I compile under VC6 I get 94 warnings C4786. MSDN says it truncated an identifier to 255 characters in the debug information.

Share this post


Link to post
Share on other sites
The warnings I believe are because in VC6, the debugger doesn''t like types longer than 255 chars. Now, map''s full typename, I think, is greater than 255 chars. Secondly, you need to specify your template args for map.

Map''s typename is

std::map,std::allocator >,int,std::less,std::allocator > >,std::allocatorair,std::allocator > const ,int> > >

I think that''s more than 255...yep...273



Gamedev for learning.
libGDN for putting it all together.
An opensource, cross platform, cross API game development library.

Share this post


Link to post
Share on other sites
Heh, no wonder it looks shorter in my post..but yes...it''s 278 chars.



Gamedev for learning.
libGDN for putting it all together.
An opensource, cross platform, cross API game development library.

Share this post


Link to post
Share on other sites