请问我写的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写的DLL文件C、PB能调用VB不能调用?
VB里为什么有的DLL直接通过引用可以使用?有的需要通过declare申明外部函数?这些DLL有什么差别?
1、为什么PB能通过DECLARE声明而VB不行?
2、如果这个dll中的 ......
刚刚那个怎么被结贴了啊,那我来开个吧。
C/C++ code:
char a='s';
char str[8]="Hello123";
printf("%c", a); //还是S,为什么?
printf("\n%08X %0 ......
#include <stdio.h>
#include <graphics.h>
void main()
{
int x0,y0,x1,y1,driver,mode,i;
driver=VGA;
mode=VGAHI;
initgraph(&driver,&mode,&qu ......
写了个简单的hello.c程序,但编译后生成的是obj文件,建工程的时候选 的是win32 动态链接库工程已经。
hello.obj
jni.pch
vc60.idb
vc60.pdb
这些是生成的文件。
hello.c
C/C++ co ......