|
-
Dec 8th, 2003, 01:35 PM
#1
Thread Starter
Addicted Member
vector of strings
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?
Last edited by Barguast; Dec 8th, 2003 at 04:52 PM.
Using Visual Studio .NET 2005
-
Dec 8th, 2003, 02:23 PM
#2
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?
-
Dec 8th, 2003, 04:37 PM
#3
Thread Starter
Addicted Member
... 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:
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
I presumed that since I'm just using a simple declaration that this is something everyone would've noticed themselves.
The declaration is just:
Code:
vector <string> vMessages;
Last edited by Barguast; Dec 8th, 2003 at 04:41 PM.
Using Visual Studio .NET 2005
-
Dec 8th, 2003, 07:02 PM
#4
Thread Starter
Addicted Member
Turned out to be VS complaining about itself... Something about a symbol name getting too long for it to handle... I disabled it.
Using Visual Studio .NET 2005
-
Dec 8th, 2003, 07:10 PM
#5
Originally posted by Barguast
... it says what compiler I'm using in the sig
Display user sigs = off for me, they're annoying and pointless
-
Dec 9th, 2003, 06:37 AM
#6
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.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|