“Debug Assertion Failed” error when changing from release mode to debug mode

依然范特西╮ 提交于 2019-12-04 22:01:47

The difference between the modes is that in release mode

assert( expr );

compiles to nothing. In debug mode it compiles to something like:

if (!(expr))
   assert_failed( "expr" );

(The above is to give the flavour, there are some subtleties). What this means is that you didn't notice the problems in release mode (you probably did something like write over some unused memory). Murphy's Law says that you will notice the problems when you come to demo to a big customer / your professor.

If you look at the line where the assertion occurs, it will tell you what it is complaining about. You need to fix that.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!