小编use*_*827的帖子

"CRT检测到应用程序在堆缓冲结束后写入内存"是什么意思?

我在使用此代码时遇到问题.它在free(q-> izv)函数中断,我得到一个调试错误说:

CRT detected that the application wrote to memory after end of heap buffer
Run Code Online (Sandbox Code Playgroud)

我不知道这意味着什么,所以我会感激任何帮助.

    typedef struct izvodjaci{
        char *izv;
        int broj;
        struct izvodjaci *sled;
    }IZV;

    obrisi_i(IZV *p){
        while (p){
            IZV *q;
            q = p;
            p = p->sled;
            if (!strcmp(q->izv,"UNKNOWN")) free(q->izv);
            free(q);
        }
    }
Run Code Online (Sandbox Code Playgroud)

提前致谢

c debugging heap buffer

9
推荐指数
1
解决办法
3万
查看次数

标签 统计

buffer ×1

c ×1

debugging ×1

heap ×1