内置函数“的malloc'不兼容的隐式声明 [英] incompatible implicit declaration of built-in function ‘malloc’

查看:872
本文介绍了内置函数“的malloc'不兼容的隐式声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到这个错误:

警告:内建函数不兼容的隐式声明'的malloc

试图做到这一点:

fileinfo_list * tempList =的malloc(sizeof的(fileinfo_list));

只是为了参考手头使用的结构是:

Just for the reference the struct used at hand is:

typedef struct {
    fileinfo** filedata;  
    size_t nFiles;    
    size_t size;  
    size_t fileblock;  
} fileinfo_list;

我看不出什么毛病我都干了些什么?我只是创建一个 tempList 1×大小 fileinfo_list

推荐答案

您可能忘了,包括<文件stdlib.h方式>

这篇关于内置函数“的malloc'不兼容的隐式声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆