记录详情

Compile Error

foo.c:28:5: error: redefinition of 'Search'
   28 | int Search(int x,int n,int a[10000])
      |     ^~~~~~
foo.c:2:5: note: previous definition of 'Search' was here
    2 | int Search(int x,int n,int a[10000])
      |     ^~~~~~
foo.c:41:5: error: redefinition of 'main'
   41 | int main()
      |     ^~~~
foo.c:15:5: note: previous definition of 'main' was here
   15 | int main()
      |     ^~~~
foo.c: In function 'main':
foo.c:18:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   18 |  scanf("%d",&n);
      |  ^~~~~~~~~~~~~~
foo.c:21:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   21 |   scanf("%d",&a[i]);
      |   ^~~~~~~~~~~~~~~~~
foo.c:23:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   23 |  scanf("%d",&x);
      |  ^~~~~~~~~~~~~~
foo.c: In function 'Search':
foo.c:39:1: warning: control reaches end of non-void function [-Wreturn-type]
   39 | }
      | ^
foo.c: In function 'main':
foo.c:44:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   44 |  scanf("%d",&n);
      |  ^~~~~~~~~~~~~~
foo.c:47:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   47 |   scanf("%d",&a[i]);
      |   ^~~~~~~~~~~~~~~~~
foo.c:49:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   49 |  scanf("%d",&x);
      |  ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A7-4 数组的查找函数
比赛
C语言课程设计考试
语言
C
递交时间
2022-05-31 11:50:15
评测时间
2022-05-31 11:50:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes