weixin_慕前端2092959
2019-08-08 18:23
gcc demo.c max.c
demo.c: In function ‘main’:
demo.c:7:18: warning: implicit declaration of function ‘max’; did you mean ‘main’? [-Wimplicit-function-declaration]
int maxNum = max(a1,a2);
^~~
main
代码如下:
#include <stdio.h>
// #include "max.c"
int main()
{
int a1 = 30;
int a2 = 32;
int maxNum = max(a1,a2);
printf("the max value is %d\n",maxNum);
return 0;
}
版本问题。报错后你运行./a.out程序还是能成功运行的
Linux C语言编程基本原理与实践
203963 学习 · 451 问题
相似问题