我的编译器(Gcc)警告我:
警告:函数的隐式声明
请帮我弄明白为什么会来。
发布于 2018-03-23 13:33:25
例如:
int main()
{
fun(2, "21"); /* The compiler has not seen the declaration. */
return 0;
}
int fun(int x, char *p)
{
/* ... */
}
需要在main之前声明您的函数,比如直接声明函数,或者在头文件中声明函数:
int fun(int x, char *p);
https://stackoverflow.com/questions/-100003674
复制相似问题