Archived

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

Ardaxus

STL compiler warnings

Recommended Posts

Ardaxus    122
Does anyone else always get compiler warnings when using STL template classes? My code works, but whenever I use one of my own classes as a template value type, I get compiler warnings. I have read article that some programmers always make sure their code doesn''t generate any kind of warning at all. So how do they get past these types of warnings? Is this a common thing to get STL warnings? Or is it just me?

Share this post


Link to post
Share on other sites
Kippesoep    892
You probably get the MSVC warning about identifiers being truncated in the debug info (warning C4786). These are quite annoying.
Most people just disable them:


#pragma warning (disable: 4786)


It''s not really anything to do with your code, but a compiler limitation.

Share this post


Link to post
Share on other sites
deepdene    292
I made this to a topic asking pretty much the same question about a day or so ago.

Another thing you might want to consider (since this is mainly a problem with VC++ 6) if you can afford it upgrade to VC++ 7.1 (2003 edition) it doesn''t suffer from a lot of the STL problems that VC++ 6 did. If you are a student you can get the Visual Studio Academic version which is basically Visual Studio Pro with a few extra optional academic tools.

Share this post


Link to post
Share on other sites