首页 > 其他 > 详细

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

时间:2014-07-31 16:59:17      阅读:539      评论:0      收藏:0      [点我收藏+]
由于代码中使用了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<stdlib.h>

#include<string.h>

解决warning: incompatible implicit declaration of built-in function 'malloc',布布扣,bubuko.com

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

原文:http://blog.csdn.net/yuesichiu/article/details/38319295

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!