pbavishi
asked on
Compile warning
When I #include <map> to use a function that needs map<> I get following warning message during compilation.
These are kind of harmless message as I can compile. link and run my program.
But I want to eliminate these messages.
What should I do?
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\utilit y(17) : warning C4786: '?$pair@Viterator@?$_Tree@ HU?$pair@$ $CBHV?$bas ic_string@ DU?$char_t raits@D@st d@@V?$allo cator@D@2@ @std@@@std @@U_Kfn@?$ map@HV?$ba sic_string @DU?$char_ traits@D@s td@@V?$all
ocator@D@2@@std@@U?$less@H @2@V?$allo cator@V?$b asic_strin g@DU?$char _traits@D@ std@@V?$al locator@D@ 2@@std@@@2 @@2@U?$les s@H@2@V?$a llocator@V ?$basic_st ring@DU?$c har_traits @D@std@@V? $allocator @D@2@@std@ @@2@@std@@ _N' : identifier was truncated to '255' cha
racters in the browser information
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93 ) : see reference to class template instantiation 'std::pair<class std::_Tree<int,struct std::pair<int const ,class std::basic_string<char,str uct std::char_traits<char>,cla ss std::a
llocator<char> > >,struct std::map<int,class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> >,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator
<char> > > >::_Kfn,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > > >::iterator,bool>' being compiled
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93 ) : while compiling class-template member function 'class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > &__thiscall std::map<int,class std::basic
_string<char,struct std::char_traits<char>,cla ss std::allocator<char> >,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > > >::operator [](const int &)'
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\utilit y(21) : warning C4786: '??0?$pair@Viterator@?$_Tr ee@HU?$pai r@$$CBHV?$ basic_stri ng@DU?$cha r_traits@D @std@@V?$a llocator@D @2@@std@@@ std@@U_Kfn @?$map@HV? $basic_str ing@DU?$ch ar_traits@ D@std@@V?$
allocator@D@2@@std@@U?$les s@H@2@V?$a llocator@V ?$basic_st ring@DU?$c har_traits @D@std@@V? $allocator @D@2@@std@ @@2@@2@U?$ less@H@2@V ?$allocato r@V?$basic _string@DU ?$char_tra its@D@std@ @V?$alloca tor@D@2@@s td@@@2@@st d@@_N@std@ @QAE@XZ' : identifier was truncat
ed to '255' characters in the browser information
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93 ) : see reference to class template instantiation 'std::pair<class std::_Tree<int,struct std::pair<int const ,class std::basic_string<char,str uct std::char_traits<char>,cla ss std::a
llocator<char> > >,struct std::map<int,class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> >,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator
<char> > > >::_Kfn,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > > >::iterator,bool>' being compiled
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93 ) : while compiling class-template member function 'class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > &__thiscall std::map<int,class std::basic
_string<char,struct std::char_traits<char>,cla ss std::allocator<char> >,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > > >::operator [](const int &)'
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\utilit y(23) : warning C4786: '??0?$pair@Viterator@?$_Tr ee@HU?$pai r@$$CBHV?$ basic_stri ng@DU?$cha r_traits@D @std@@V?$a llocator@D @2@@std@@@ std@@U_Kfn @?$map@HV? $basic_str ing@DU?$ch ar_traits@ D@std@@V?$
allocator@D@2@@std@@U?$les s@H@2@V?$a llocator@V ?$basic_st ring@DU?$c har_traits @D@std@@V? $allocator @D@2@@std@ @@2@@2@U?$ less@H@2@V ?$allocato r@V?$basic _string@DU ?$char_tra its@D@std@ @V?$alloca tor@D@2@@s td@@@2@@st d@@_N@std@ @QAE@ABVit erator@?$_ Tree@HU?$p air
@$$CBHV?$basic_string@DU?$ char_trait s@D@std@@V ?$allocato r@D@2@@std @@@std@@U_ Kfn@?$map@ HV?$basic_ string@DU? $char_trai ts@D@std@@ V?$allocat or@D@2@@st d@@U?$less @H@2@V?$al locator@V? $basic_str ing@DU?$ch ar_traits@ D@std@@V?$ allocator@ D@2@@std@@ @2@@2@U?$l ess
@H@2@V?$allocator@V?$basic _string@DU ?$char_tra its@D@std@ @V?$alloca tor@D@2@@s td@@@2@@1@ AB_N@Z' : identifier was truncated to '255' characters in the browser information
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93 ) : see reference to class template instantiation 'std::pair<class std::_Tree<int,struct std::pair<int const ,class std::basic_string<char,str uct std::char_traits<char>,cla ss std::a
llocator<char> > >,struct std::map<int,class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> >,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator
<char> > > >::_Kfn,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > > >::iterator,bool>' being compiled
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93 ) : while compiling class-template member function 'class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > &__thiscall std::map<int,class std::basic
_string<char,struct std::char_traits<char>,cla ss std::allocator<char> >,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > > >::operator [](const int &)'
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\utilit y(25) : warning C4786: '??0?$pair@Viterator@?$_Tr ee@HU?$pai r@$$CBHV?$ basic_stri ng@DU?$cha r_traits@D @std@@V?$a llocator@D @2@@std@@@ std@@U_Kfn @?$map@HV? $basic_str ing@DU?$ch ar_traits@ D@std@@V?$
allocator@D@2@@std@@U?$les s@H@2@V?$a llocator@V ?$basic_st ring@DU?$c har_traits @D@std@@V? $allocator @D@2@@std@ @@2@@2@U?$ less@H@2@V ?$allocato r@V?$basic _string@DU ?$char_tra its@D@std@ @V?$alloca tor@D@2@@s td@@@2@@st d@@_N@std@ @QAE@ABU?$ pair@$DCAB @$DCAC@@1@ @Z'
: identifier was truncated to '255' characters in the browser information
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93 ) : see reference to class template instantiation 'std::pair<class std::_Tree<int,struct std::pair<int const ,class std::basic_string<char,str uct std::char_traits<char>,cla ss std::a
llocator<char> > >,struct std::map<int,class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> >,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator
<char> > > >::_Kfn,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > > >::iterator,bool>' being compiled
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93 ) : while compiling class-template member function 'class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > &__thiscall std::map<int,class std::basic
_string<char,struct std::char_traits<char>,cla ss std::allocator<char> >,struct std::less<int>,class std::allocator<class std::basic_string<char,str uct std::char_traits<char>,cla ss std::allocator<char> > > >::operator [](const int &)'
Linking...
These are kind of harmless message as I can compile. link and run my program.
But I want to eliminate these messages.
What should I do?
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\utilit
ocator@D@2@@std@@U?$less@H
racters in the browser information
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93
llocator<char> > >,struct std::map<int,class std::basic_string<char,str
<char> > > >::_Kfn,struct std::less<int>,class std::allocator<class std::basic_string<char,str
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93
_string<char,struct std::char_traits<char>,cla
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\utilit
allocator@D@2@@std@@U?$les
ed to '255' characters in the browser information
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93
llocator<char> > >,struct std::map<int,class std::basic_string<char,str
<char> > > >::_Kfn,struct std::less<int>,class std::allocator<class std::basic_string<char,str
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93
_string<char,struct std::char_traits<char>,cla
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\utilit
allocator@D@2@@std@@U?$les
@$$CBHV?$basic_string@DU?$
@H@2@V?$allocator@V?$basic
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93
llocator<char> > >,struct std::map<int,class std::basic_string<char,str
<char> > > >::_Kfn,struct std::less<int>,class std::allocator<class std::basic_string<char,str
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93
_string<char,struct std::char_traits<char>,cla
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\utilit
allocator@D@2@@std@@U?$les
: identifier was truncated to '255' characters in the browser information
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93
llocator<char> > >,struct std::map<int,class std::basic_string<char,str
<char> > > >::_Kfn,struct std::less<int>,class std::allocator<class std::basic_string<char,str
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(93
_string<char,struct std::char_traits<char>,cla
Linking...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BTW, this documentation can also be found at http://msdn.microsoft.com/library/en-us/vccore98/html/c4786.asp ("Compiler Warning (level 1) C4786")
Or you can use
#pragma warning (disable : 4786)
to disable the warning. Put it in a header file which gets included by all files where this occurs. This could be stdafx.h.
#pragma warning (disable : 4786)
to disable the warning. Put it in a header file which gets included by all files where this occurs. This could be stdafx.h.
#pragma warning (disable : 4786)
Putting this didn;t help;
Putting this didn;t help;
I am using it succesfully. Is it in the include before the STL headers? If not change the order.
ASKER
#pragma warning (disable : 4786)
#include <time.h>
#include <string>
#include <map>
using namespace std;
Still no good.
#include <time.h>
#include <string>
#include <map>
using namespace std;
Still no good.
May I ask who is asking that question? pbavishi or pb_india?