记录详情

Compile Error

/in/foo.c:2:1: warning: data definition has no type or storage class
 *max = scores[0];
 ^
/in/foo.c:2:2: warning: type defaults to 'int' in declaration of 'max' [-Wimplicit-int]
 *max = scores[0];
  ^~~
/in/foo.c:2:8: error: 'scores' undeclared here (not in a function)
 *max = scores[0];
        ^~~~~~
/in/foo.c:3:5: warning: data definition has no type or storage class
     *min = scores[0];
     ^
/in/foo.c:3:6: warning: type defaults to 'int' in declaration of 'min' [-Wimplicit-int]
     *min = scores[0];
      ^~~
/in/foo.c:6:5: error: expected identifier or '(' before 'for'
     for (int i = 0; i < size; i++) {
     ^~~
/in/foo.c:6:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
     for (int i = 0; i < size; i++) {
                       ^
/in/foo.c:6:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
     for (int i = 0; i < size; i++) {
                                ^~
/in/foo.c:16:5: warning: data definition has no type or storage class
     *average = sum / size;
     ^
/in/foo.c:16:6: warning: type defaults to 'int' in declaration of 'average' [-Wimplicit-int]
     *average = sum / size;
      ^~~~~~~
/in/foo.c:16:22: error: 'size' undeclared here (not in a function)
     *average = sum / size;
                      ^~~~
/in/foo.c:17:1: error: expected identifier or '(' before '}' token
 }
 ^
/in/foo.c: In function 'main':
/in/foo.c:28:5: warning: implicit declaration of function 'calculate' [-Wimplicit-function-declaration]
     calculate(scores, 10, &max, &min, &average);
     ^~~~~~~~~

信息

递交者
类型
递交
比赛
2024级补考15点半
语言
C
递交时间
2024-12-31 15:43:38
评测时间
2024-12-31 15:43:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes