Jump to content
  • Advertisement
Sign in to follow this  
EonStrife

Question about VC++ 6.0 (about map STL)

This topic is 4438 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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.

Share this post


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

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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!