/ Vijos /

记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:9:2: error: unknown type name 'chars'
  chars name;
  ^~~~~
/in/foo.c:13:2: error: unknown type name 'chars'
  chars Name[N];
  ^~~~~
/in/foo.c:16:11: warning: format '%c' expects argument of type 'char *', but argument 2 has type 'int *' [-Wformat=]
   scanf("%c %d %d %c %c %d\n",&name,&fscore,&cscore,&isvip,&iswest,&sciNum);
           ^
/in/foo.c:28:6: error: 'max' undeclared (first use in this function)
   if(max < sumBUD)
      ^~~
/in/foo.c:28:6: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:31:13: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
             strcpy(Name,i);
             ^~~~~~
/in/foo.c:31:13: warning: incompatible implicit declaration of built-in function 'strcpy'
/in/foo.c:31:13: note: include '<string.h>' or provide a declaration of 'strcpy'
/in/foo.c:31:20: warning: passing argument 1 of 'strcpy' from incompatible pointer type [-Wincompatible-pointer-types]
             strcpy(Name,i);
                    ^~~~
/in/foo.c:31:20: note: expected 'char *' but argument is of type 'int *'
/in/foo.c:31:25: warning: passing argument 2 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion]
             strcpy(Name,i);
                         ^
/in/foo.c:31:25: note: expected 'const char *' but argument is of type 'int'
/in/foo.c:38:21: error: 'i' undeclared (first use in this function)
  printf("%c\n",Name[i]);
                     ^
/in/foo.c:12:6: warning: variable 'sum' set but not used [-Wunused-but-set-variable]
  int sum[N];
      ^~~
/in/foo.c:7:6: warning: unused variable 'n' [-Wunused-variable]
  int n=0;
      ^
/in/foo.c:6:6: warning: unused variable 'sumBUD' [-Wunused-variable]
  int sumBUD,sumAll=0;
      ^~~~~~

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2024-11-04 08:03:45
评测时间
2024-11-04 08:03:45
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes