Question about VC++ 6.0 (about map STL)

Started by
8 comments, last by ChaosEngine 17 years, 12 months ago
I declare like this : map<int, int> tMap; But, when I compile, VC++ 6.0 gives me a whooping amount of warning message : D:\Program Samples\tes dialog\tes dialog.cpp(74) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::iterato r,std::pair<int const ,int>,std::pair<int const ,int> &,std::pair<int const ,int> *,int>' : identifier was truncated to '255' characters in the debug information D:\Program Samples\tes dialog\tes dialog.cpp(74) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::const_i terator,std::pair<int const ,int>,std::pair<int const ,int> const &,std::pair<int const ,int> const *,int>' : identifier was truncated to '255' characters in the debug information D:\Program Samples\tes dialog\tes dialog.cpp(74) : warning C4786: 'std::pair<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::iterator,std::_Tree<int,std::pair <int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::iterator>' : identifier was truncated to '255' characters in the debug information D:\Program Samples\tes dialog\tes dialog.cpp(74) : warning C4786: 'std::pair<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::const_iterator,std::_Tree<int,std ::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::const_iterator>' : identifier was truncated to '255' characters in the debug information tes dialogDlg.cpp D:\Program Samples\tes dialog\tes dialogDlg.cpp(70) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::iter ator,std::pair<int const ,int>,std::pair<int const ,int> &,std::pair<int const ,int> *,int>' : identifier was truncated to '255' characters in the debug information D:\Program Samples\tes dialog\tes dialogDlg.cpp(70) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::cons t_iterator,std::pair<int const ,int>,std::pair<int const ,int> const &,std::pair<int const ,int> const *,int>' : identifier was truncated to '255' characters in the debug information D:\Program Samples\tes dialog\tes dialogDlg.cpp(70) : warning C4786: 'std::pair<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::iterator,std::_Tree<int,std::p air<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::iterator>' : identifier was truncated to '255' characters in the debug information D:\Program Samples\tes dialog\tes dialogDlg.cpp(70) : warning C4786: 'std::pair<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::const_iterator,std::_Tree<int, std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::const_iterator>' : identifier was truncated to '255' characters in the debug information Generating Code... c:\program files\microsoft visual studio\vc98\include\xtree(183) : warning C4786: 'std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::~_Tree<int,std::pair<int co nst ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >' : identifier was truncated to '255' characters in the debug information c:\program files\microsoft visual studio\vc98\include\xtree(160) : warning C4786: 'std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::_Tree<int,std::pair<int con st ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >' : identifier was truncated to '255' characters in the debug information c:\program files\microsoft visual studio\vc98\include\xtree(183) : warning C4786: 'std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::~_Tree<int,std::pair<int co nst ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >' : identifier was truncated to '255' characters in the debug information What should I do ? Thanks :)
Advertisement
That shouldn't effect the building of the project. You could just disable that warning message.
____________________________________________________________Programmers Resource Central
It isn't a problem with your code - it's warning you about a limitation with the VC6 debugger. Disable that error message in the project settings - the messages serve no purpose and they swamp any important warning messages.
Quote:Original post by EonStrife
What should I do ?

Use anything but VC6
Thanks, so it doesn't have anything to do with the exception...
Btw,occasionally, I got this error message : "user breakpoint called from code at 0*xxxxxxxx". Yes, I have set it to Debug Multithreaded DLL, but this error pop up sometimes. How can I avoid it ?

Use anything but VC6[\quote]
LoL, pretty helpful advice for me in near the end of development of a program.
I think that error means that you are trying to call an object's method with a pointer, but the pointer does not point to an object. You'll need to use the debugger to find out where and why this is happening. If it's not meant to be pointing to anything sometimes, then you can check easily:
if ( pointer )
pointer->method();
____________________________________________________________Programmers Resource Central
Btw, anyone here thinks that CString is evil ?
I think that in my app, it likes to cause Exception...
Quote:Original post by Trap
Quote:Original post by EonStrife
What should I do ?

Use anything but VC6
Seconded.

Quote:Original post by EonStrife
Btw, anyone here thinks that CString is evil ?
I think that in my app, it likes to cause Exception...
CString isn't that bad, but std::string is better. It's a general opinion that MFC itself is evil.
I doubt that CString is causing exceptions, rather the way you're using it is.

well, these statements can cause exception sometimes, which make my application unstable(sometimes it work, sometimes it doesn't) :

CString myCstring(array_char);

or

myCstring=array_char;

Even in MSDN they write :
Quote:You should be aware that memory exceptions may occur whenever you use the assignment operator because new storage is often allocated to hold the resulting CString object.

Quote:Original post by EonStrife

Even in MSDN they write :
Quote:You should be aware that memory exceptions may occur whenever you use the assignment operator because new storage is often allocated to hold the resulting CString object.


so what? the same thing can happen with std::string.

if I do
int *x = new int[20];

if the system doesn't have 80 bytes to spare, it's prefectly entitle to throw an exception.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

This topic is closed to new replies.

Advertisement