Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#pragma warning(disable:4786)

Status
Not open for further replies.

cansley4puss

Programmer
May 15, 2001
9
GB
Really annoyed about this - Basically you can't use the STL map class template in VC++ 6 (Pro - SP5) because using it generates about 50-70 long warnings when you compile. These are benign (in fact, pointless) warnings of 'type' 4786. You should be able to disable them using #pragma warning(disable:4786) but it doesn't work. Microsoft openly admit that this is a bug..


and blithely announce "This problem was corrected in Microsoft Visual C++ .NET". Well great! What about those of us very happy sticking with VC++ 6? Why on earth don't they provide a patch? map is part of the STL, where, last time I checked, the 'S' stood for 'Standard'. Supporting this template properly is not optional.

Anyone got any ideas? I could upgrade I suppose but don't quite understand all this .NET nonsense. And anyway, I can't find VC++ .NET Professional, only Standard (there's that word again). Can anyone shed any light on that?

Sorry for the angry tone - not happy with this Bill.
 
Strange !

I am using Visual C++ v6.00 Enterprise Editon (Which according to the link you provided also should have this problem) and I haven't got any problems (I use map quite often).

Most of my source files contains this :
#pragma warning(disable : 4786)
and it works fine !


I guess you only have the problem when building a debug version ?


/JOlesen

 
JOlesen

Wow, that's clever! I wonder if it's the Enterprise Ed. that's behaving? What service pack do you have installed?

I've got round the problem by putting together a little map template of my own using a couple of vectors and the find() generic algo. It's limited but does what I need and seems to work just fine.

Cheers, Ian.
 
Servicepack ... not sure (IDE wont give you this information - think I have to check timestamps on a number of files - and I haven't got the 'translation table').

If I remember right : SP5.

/JOlesen
 
Yeah I've got SP5 too - it's the latest (and I would imagine last) isn't it? Funny isn't it how you can't get access to this info. Oh well..

Cheers, Ian.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top