我在使用此代码时遇到问题.它在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)
提前致谢