[juliantec_list] Re: 一个冲突的隐式声明

  • From: "Yihe Chen" <yihect@xxxxxxxxxxxxxx>
  • To: 姜华 <jh2012626@xxxxxxxxx>, <app-dev-in-linux@xxxxxxxxxxxxxx>
  • Date: Thu, 2 Aug 2012 17:17:07 +0800

From: "姜华" <jh2012626@xxxxxxxxx>

queue.c:10: warning: incompatible implicit declaration of built-in
function ‘malloc’

检查下你是不是包含有相关的头文件了。

这是代码:
p_queue = (elemtype *)malloc(sizeof(elemtype)*50);   //分配50个elemtype 类型的内存
elemtype 是int类型,p_queue 是elemtype *类型的。where‘s question?


另外发问的时候,最好文字归文字,
代码/编译提示归代码/编译提示,
这样看的人就会更加清楚。





Learning, Just As Your Favourite Thing!

Maillist, See http://www.juliantec.info/mlist/mail-lists.html
JulBlog, See http://www.juliantec.info/julblog/summary.php
JulWiki, See http://www.juliantec.info/wiki/
JulJob, see http://www.juliantec.info/juljob/



Other related posts: