Error: HEAP CORRUPTION DETECTED

产生堆内存的错误,调试是参考[1],在头文件加上:

#define CRTDBG_MAP_ALLOC
#include <crtdbg.h>


在调试的代码处加上:_ASSERTE(_CrtCheckMemory());



输入是参考上一篇(http://blog.csdn.net/lsxpu/article/details/52100370)

6 6

323212

323312

333212

232312

111111

222222

产生的错误的位置是在i=0,j=3,不知道为啥如果上面的char类型换成int类型就没有错误。。很是奇怪






参考:

【1】heap corruption detected错误解决方法调试方法以及内存管理相关 http://blog.sina.com.cn/s/blog_622bd16601018zzu.html

猜你喜欢

转载自blog.csdn.net/lsxpu/article/details/52149911