编译时,出现了关于malloc和free的警告,麻烦大佬帮我解答一下疑惑,谢谢
在最前面加一个 #include <stdlib.h>
因为:
The stdlib.h file contains the header information or prototype of the malloc, calloc, realloc and free functions.
缺少头文件#include <stdlib.h>和#include <malloc.h>