CRT detected that the application wrote to memory after end of heap buffer
出现这种情况的原因:
1:分配的内存不够
比如
int index_char =10000000000
char* cLast_fileName = new char[5];
sprintf(cLast_fileName, “%d.jpg",index_char);
修改:
int index_char =10000000000
char* cLast_fileName = new char[30];
sprintf(cLast_fileName, "%d.jpg”,index_char);
分配的内存不够
最新推荐文章于 2022-11-05 11:22:21 发布