zoukankan      html  css  js  c++  java
  • 解决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<stdlib.h>

    #include<string.h>

  • 相关阅读:
    最短Hamilton路径-状压dp解法
    泡芙
    斗地主
    楼间跳跃
    联合权值
    虫食算
    抢掠计划
    间谍网络
    城堡the castle
    【模板】缩点
  • 原文地址:https://www.cnblogs.com/mfrbuaa/p/5176768.html
Copyright © 2011-2022 走看看