解决warning: incompatible implicit declaration of built-in function 'strlen'

版权声明:嘤嘤嘤 https://blog.csdn.net/HNUCSEE_LJK/article/details/88648735

c语言编译时,对于类似于warning: incompatible implicit declaration of built-in function 'strlen'的警告,可通过添加相应的头文件来消除。

如strlen、strcpy等对字符串的操作函数,需要添加#include <string.h>

如malloc、free等对内存的操作函数,需要添加#include <stdlib.h>

猜你喜欢

转载自blog.csdn.net/HNUCSEE_LJK/article/details/88648735
今日推荐