记录详情

Compile Error

foo.c: In function 'main':
foo.c:15:2: warning: implicit declaration of function 'FindiSecondMax' [-Wimplicit-function-declaration]
  FindiSecondMax(a,n);
  ^~~~~~~~~~~~~~
foo.c:20:7: warning: conflicting types for 'FindiSecondMax'
  void FindiSecondMax (int a[],int n);
       ^~~~~~~~~~~~~~
foo.c:15:2: note: previous implicit declaration of 'FindiSecondMax' was here
  FindiSecondMax(a,n);
  ^~~~~~~~~~~~~~
foo.c:4:49: warning: unused variable 'm1' [-Wunused-variable]
  int a[10001], b[10001], n1, n2,n,max, smax, i, m1,m2;
                                                 ^~
foo.c:4:40: warning: unused variable 'smax' [-Wunused-variable]
  int a[10001], b[10001], n1, n2,n,max, smax, i, m1,m2;
                                        ^~~~
foo.c:4:35: warning: unused variable 'max' [-Wunused-variable]
  int a[10001], b[10001], n1, n2,n,max, smax, i, m1,m2;
                                   ^~~
foo.c:5:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d",&n1,&n2);
  ^~~~~~~~~~~~~~~~~~~~~~
foo.c:8:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &a[i]);
   ^~~~~~~~~~~~~~~~~~
foo.c:12:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &b[i]);
   ^~~~~~~~~~~~~~~~~~
foo.c:15:2: warning: 'n' is used uninitialized in this function [-Wuninitialized]
  FindiSecondMax(a,n);
  ^~~~~~~~~~~~~~~~~~~
foo.c:16:2: warning: 'm2' is used uninitialized in this function [-Wuninitialized]
  printf("%d ", m2);
  ^~~~~~~~~~~~~~~~~
/tmp/cchBVNh4.o: In function `main':
foo.c:(.text.startup+0xbe): undefined reference to `FindiSecondMax'
foo.c:(.text.startup+0xdf): undefined reference to `FindiSecondMax'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2021(四) 作业第二场:见面赛
语言
C
递交时间
2021-10-31 12:54:37
评测时间
2021-10-31 12:54:37
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes