打印

implicit declaration ?

implicit declaration ?

有个程序编译之后出现一个warning:implicit declaration of function

"asprintf',请问大家这应该怎么改.

程序代码如下:

[code:1]

#include<stdio.h>

int main()
{
  char *a;
  float b;

  printf("please input a number!\n");
  scanf("%f",&b);

  asprintf(&a,"%f",b);

  printf("%s\n",a);

  return 0;
}

[/code:1]

TOP

asprintf 这个函数有定义吗?头文件包含了吗? 运行结果出来了吗?
因为我是程序员,所以不能容忍任何严重的BUG! 很好看的韩剧:《你来自哪颗星》,《去海边吧》,《最后的舞请与我一起》 看贴的能不能给留个言啊!~~~~

TOP

头文件包含了,include<stdio.h>
运行结果也能出来, 就是有warning,不知道怎么回事?

TOP