调用回调函数出现或者大循环出现has triggered a breakpoint

triggered a breakpoint 的意思是触发一个断点。
这个问题一般发生在程序运行过程中。
下面是错误发生显示的信息:
Windows has triggered a breakpoint in xxx.exe.
This may be due to a corruption of the heap, which indicates a bug in xxx.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while t.exe has focus.
The output window may have more diagnostic information.
这个错误发生的两个原因:
1.用delete或是free删除不是堆栈上的变量。
比如:
int n = 88;
delete n;
2.使用了已经delete或是free后的变量。
比如:
char *str = (char *) malloc(100); strcpy(str, "hello"); free(str); if(str != NULL) { strcpy(str, "world"); printf(str); }
上一篇:Spring对事务管理的支持的发展历程(基础篇)


下一篇:Python3.5入门学习记录-函数