Does anyone else get all of those warnings when using a vector of strings? The program I'm doing does still work, but the warnings are really annoying since they hide all of the real errors. Can I resolve the warnings somehow?
Printable View
Does anyone else get all of those warnings when using a vector of strings? The program I'm doing does still work, but the warnings are really annoying since they hide all of the real errors. Can I resolve the warnings somehow?
What are you talking about? I get no errors...
When you have questions about any errors or warnings, ask yourself... SELF, do they need to know what compiler I am using? SELF, do they need to see the code I am getting errors with?
... it says what compiler I'm using in the sig - Visual Studio 6.0. As for the warnings, well there are over 20 of them, and they don't really say much, for example this is just one of 'em:
I presumed that since I'm just using a simple declaration that this is something everyone would've noticed themselves.Code:c:\program files\microsoft visual studio\vc98\include\vector(48) : warning C4786: '??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@IABV
?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' : identifier was truncated to '255' characters in the browser information
c:\documents and settings\jwinder\my documents\university\distributed systems programming\cc_client\socket.h(17) : see reference to class template instantiation 'std::vector<class std::basic_string<char,struct std::char_traits<char>,cla
ss std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >' being compiled
The declaration is just:
Code:vector <string> vMessages;
Turned out to be VS complaining about itself... Something about a symbol name getting too long for it to handle... I disabled it.
Display user sigs = off for me, they're annoying and pointlessQuote:
Originally posted by Barguast
... it says what compiler I'm using in the sig
VC++6 (and I think 7 too, but not 7.1) can only handle identifiers up to 255 characters in the debug information. If an identifier gets longer, it's truncated. Only for the debug information. This can cause problems if two identifiers are the same except in the last few characters.
Since full names are used instead of typedefs, the harmless
vector<string>
suddenly becomes
std::vector<class std::basic_string<char,struct std::char_traits<char>,cla
ss std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >
which then gets mangled to
??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_stri ng@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@IABV?$basic_string@DU?$char_traits@D@s td@@V?$allocator@D@2@@1@ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@ @@1@@Z
which is longer than 255 characters.
You can disregard the warning, you can even simply switch it off via directives or project options.