Sign in to follow this  
EonStrife

Question about VC++ 6.0 (about map STL)

Recommended Posts

EonStrife    122
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 :)

Share this post


Link to post
Share on other sites
Nitage    1107
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.

Share this post


Link to post
Share on other sites
EonStrife    122
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 ?

[quote]Use anything but VC6[\quote]
LoL, pretty helpful advice for me in near the end of development of a program.

Share this post


Link to post
Share on other sites
Tera_Dragon    260
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();

Share this post


Link to post
Share on other sites
Evil Steve    2017
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.

Share this post


Link to post
Share on other sites
EonStrife    122

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.

Share this post


Link to post
Share on other sites
ChaosEngine    5185
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this