/ Vijos /

记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:29:6: error: 'max' undeclared (first use in this function)
   if(max < sumBUD)
      ^~~
/in/foo.c:29:6: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:32:25: warning: passing argument 2 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion]
             strcpy(Name,i);
                         ^
In file included from /in/foo.c:3:0:
/usr/include/string.h:125:14: note: expected 'const char * restrict' but argument is of type 'int'
 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~
/in/foo.c:39:21: error: 'i' undeclared (first use in this function)
  printf("%c\n",Name[i]);
                     ^
/in/foo.c:13:6: warning: variable 'sum' set but not used [-Wunused-but-set-variable]
  int sum[N];
      ^~~
/in/foo.c:8:6: warning: unused variable 'n' [-Wunused-variable]
  int n=0;
      ^
/in/foo.c:7:6: warning: unused variable 'sumBUD' [-Wunused-variable]
  int sumBUD,sumAll=0;
      ^~~~~~

信息

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