+ -
当前位置:首页 → 问答吧 → warning: function declaration isn't a prototype 怎麽解?啊?(在狙等)

warning: function declaration isn't a prototype 怎麽解?啊?(在狙等)

时间:2005-10-08

来源:互联网

著著了      

作者: smattershi   发布时间: 2005-10-08

函数没有声明。在你调用的这个函数前面加上该函数的定义即可。

main()
{
  test();
}

test (int a)
{
  printf("test: %d\n", a);
}

这个代码中如果在main函数前面加上“test (int a);”就可以正确运行了      

作者: deven   发布时间: 2005-10-08