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

由于代码中使用了malloc函数和字符串函数,编译时出现错误

warning: incompatible implicit declaration of built-in function ‘malloc’
warning: incompatible implicit declaration of built-in function ‘bzero’
warning: incompatible implicit declaration of built-in function ‘strncpy                                                                                                 ’
warning: incompatible implicit declaration of built-in function ‘strlen’


解决办法:

        加入头文件即可

#include

#include

你可能感兴趣的:(调试总结)