记录详情

Compile Error

foo.c: In function 'Search':
foo.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
    6 |         for(i=0;i<n;i++)
      |         ^~~
foo.c:6:13: error: 'i' undeclared (first use in this function)
    6 |         for(i=0;i<n;i++)
      |             ^
foo.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
foo.c: In function 'main':
foo.c:27:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Search'
   27 |         Search(a,n,x);
      |         ^~~~~~
foo.c:27:20: error: 'x' undeclared (first use in this function)
   27 |         Search(a,n,x);
      |                    ^
foo.c:20:13: warning: unused variable 'number' [-Wunused-variable]
   20 |         int number=0;
      |             ^~~~~~
foo.c: In function 'Search':
foo.c:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A7-4 数组的查找函数
比赛
2023 程序设计与基础(单个的数组)
语言
C
递交时间
2023-11-21 15:20:14
评测时间
2023-11-21 15:20:14
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes