Bypassing list iterator dereferencing error in Visual C++ 2010
When I dereference a list iterator, I get an error saying that the iterator can't be dereferenced. This however, doesn't happen when I'm building a Release version and only happens on开发者_JAVA百科 the Debug version.
Is there any way I can bypass this error ?
You don't want to bypass this check. It's telling you that something's wrong with your code and only APPEARS to go away in release mode. What's actually happening is that you're getting undefined behavior that seems to work the way you want it to. In fact, it will fail at some unpredictable point in the future causing you even more grief and possibly many hours of debugging effort.
精彩评论