易截截图软件、单文件、免安装、纯绿色、仅160KB

请问我写的c程序怎么有这么多的warning??

warning有8个,但是不知到是怎么回事,warning具体如下:
newNode1=(graph)malloc(sizeof(struct node));对应的为:
incompatible implicit declaration of built-in function 'malloc'

int M=ceil(1.35*n*(log(n)/log(2)));对应的waring为:
incompatible implicit declaration of built-in function 'ceil'
incompatible implicit declaration of built-in function 'log'

请问如何去掉这些warning??
忘加头文件了吧

#include <math.h>
#include <malloc.h>

为什么我加了#include <malloc.h>会报错?说no such file or directory

看你什么系统,ANSI标准的应该是 <stdlib.h>,
还有“int M=ceil(1.35*n*(log(n)/log(2)))”等号两边的类型不一样,M为int型,log()函数原型为double log(double x).


相关问答:

c基础

#include <string.h>
#include <stdio.h>

void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf(&q ......

关于列主高斯消元法的C程序实现的问题

下面是我写的关于高斯列主消元法的C程序实现方法。但是求解结果始终不正确啊!检查很久了,还是检查不出来,麻烦哪位大哥给指点下吧!先O(∩_∩)O谢谢了!
程序代码:

C/C++ code:
#include <stdio.h ......

为什么C写DLL文件C、PB能调用VB不能调用

为什么C写的DLL文件C、PB能调用VB不能调用?
VB里为什么有的DLL直接通过引用可以使用?有的需要通过declare申明外部函数?这些DLL有什么差别?

1、为什么PB能通过DECLARE声明而VB不行?
2、如果这个dll中的 ......

急问个c的面试题

C/C++ code:

void p1(const char **pname)
{
const char *name = "test1";
*pname = name;
}
void p2(const char **pname)
{
char *name = "test2";
*pname = name ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号