Date: 2007nov22
Language: C++
Platform: Visual Studio 6
Q. When I use STL (Standard Template Library) in Visual Studio 6
I get hundreds of useless warnings. Can I stop them?
Example warning:
c:\program files\microsoft visual studio\vc98\include\xtree(72) : 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 ,i nt>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,ci_less,std::allocator<int> >::_Kfn,ci_less,std::allocator<int> >>::const_iterator::operator->' : identifier was truncated to '255' characters >>in the debug information
A. Yes, but only if you include the STL headers in your
stdafx.h file.
Add this at the end of the of that file:
#pragma warning(disable: 4786) // no big name warnings for STL
#include <map>
#include <vector>
... other STL headers ...