记录详情

Compile Error

/in/foo.c: In function 'min_index':
/in/foo.c:12:15: error: 'min' undeclared (first use in this function)
   if(array[i]<min)
               ^~~
/in/foo.c:12:15: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:11:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int i=1;i<size;i++)
  ^~~
/in/foo.c:14:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
   return min;
   ^~~~~~
/in/foo.c: In function 'main':
/in/foo.c:18:12: error: 'MAX_SIZE' undeclared (first use in this function)
  int array[MAX_SIZE],size,index;
            ^~~~~~~~
/in/foo.c:18:6: warning: unused variable 'array' [-Wunused-variable]
  int array[MAX_SIZE],size,index;
      ^~~~~
/in/foo.c: In function 'get_array':
/in/foo.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/in/foo.c: In function 'min_index':
/in/foo.c:15:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
自测
题目
A9-5 数组中最小值的个数
语言
C
递交时间
2021-12-24 00:13:53
评测时间
2021-12-24 00:13:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes