/ Vijos /

记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:12:29: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
   12 |                 int jiangjin=0;
      |                             ^
/in/foo.c:6:22: error: flexible array member not at end of struct
    6 |                 char name[];
      |                      ^~~~
/in/foo.c:13:11: error: 'winner' undeclared (first use in this function)
   13 |         };winner{jiangjin=0};
      |           ^~~~~~
/in/foo.c:13:11: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:13:17: error: expected ';' before '{' token
   13 |         };winner{jiangjin=0};
      |                 ^
      |                 ;
/in/foo.c:17:9: error: unknown type name 'student'; use 'struct' keyword to refer to the type
   17 |         student students[number]={};
      |         ^~~~~~~
      |         struct 
/in/foo.c:17:9: error: variable-sized object may not be initialized
/in/foo.c:19:55: error: request for member 'name' in something not a structure or union
   19 |                 scanf("%s %d %d %c %c %d",&students[i].name,&students[i].qimo,&students[i].banji,&students[i].ganbu,
      |                                                       ^
/in/foo.c:19:73: error: request for member 'qimo' in something not a structure or union
   19 |                 scanf("%s %d %d %c %c %d",&students[i].name,&students[i].qimo,&students[i].banji,&students[i].ganbu,
      |                                                                         ^
/in/foo.c:19:91: error: request for member 'banji' in something not a structure or union
   19 |                 scanf("%s %d %d %c %c %d",&students[i].name,&students[i].qimo,&students[i].banji,&students[i].ganbu,
      |                                                                                           ^
/in/foo.c:19:110: error: request for member 'ganbu' in something not a structure or union
   19 |                 scanf("%s %d %d %c %c %d",&students[i].name,&students[i].qimo,&students[i].banji,&students[i].ganbu,
      |                                                                                                              ^
/in/foo.c:20:38: error: request for member 'xibu' in something not a structure or union
   20 |                          &students[i].xibu,&students[i].lunwen)
      |                                      ^
/in/foo.c:20:56: error: request for member 'lunwen' in something not a structure or union
   20 |                          &students[i].xibu,&students[i].lunwen)
      |                                                        ^
/in/foo.c:20:64: error: expected ';' before '}' token
   20 |                          &students[i].xibu,&students[i].lunwen)
      |                                                                ^
      |                                                                ;
   21 |                 }
      |                 ~                                               
/in/foo.c:23:32: error: request for member 'qimo' in something not a structure or union
   23 |                 if (students[i].qimo>80){
      |                                ^
/in/foo.c:24:36: error: request for member 'jiangjin' in something not a structure or union
   24 |                         students[i].jiangjin+=8000;
      |                                    ^
/in/foo.c:26:32: error: request for member 'qimo' in something not a structure or union
   26 |                 if (students[i].qimo>85 && students[i].banji>80){
      |                                ^
/in/foo.c:26:55: error: request for member 'banji' in something not a structure or union
   26 |                 if (students[i].qimo>85 && students[i].banji>80){
      |                                                       ^
/in/foo.c:27:36: error: request for member 'jiangjin' in something not a structure or union
   27 |                         students[i].jiangjin+=4000;
      |                                    ^
/in/foo.c:29:32: error: request for member 'qimo' in something not a structure or union
   29 |                 if (students[i].qimo>90){
      |                                ^
/in/foo.c:30:36: error: request for member 'jiangjin' in something not a structure or union
   30 |                         students[i].jiangjin+=2000;
      |                                    ^
/in/foo.c:32:32: error: request for member 'qimo' in something not a structure or union
   32 |                 if (students[i].qimo>85 && students[i].xibu == "Y"){
      |                                ^
/in/foo.c:32:55: error: request for member 'xibu' in something not a structure or union
   32 |                 if (students[i].qimo>85 && students[i].xibu == "Y"){
      |                                                       ^
/in/foo.c:33:36: error: request for member 'jiangjin' in something not a structure or union
   33 |                         students[i].jiangjin+=1000;
      |                                    ^
/in/foo.c:35:32: error: request for member 'banji' in something not a structure or union
   35 |                 if (students[i].banji>80 && students[i].ganbu =="Y"){
      |                                ^
/in/foo.c:35:56: error: request for member 'ganbu' in something not a structure or union
   35 |                 if (students[i].banji>80 && students[i].ganbu =="Y"){
      |                                                        ^
/in/foo.c:36:37: error: 'jiangjin' undeclared (first use in this function); did you mean 'totaljiangjin'?
   36 |                         students[i],jiangjin+=850;
      |                                     ^~~~~~~~
      |                                     totaljiangjin
/in/foo.c:36:36: warning: left-hand operand of comma expression has no effect [-Wunused-value]
   36 |                         students[i],jiangjin+=850;
      |                                    ^
/in/foo.c:38:29: error: request for member 'jiangjin' in something not a structure or union
   38 |                 if (students.jiangjin > winner.jiangjin){
      |                             ^
/in/foo.c:41:43: error: request for member 'jiangjin' in something not a structure or union
   41 |                 totaljiangjin+=students[i].jiangjin;
      |                                           ^

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2025-10-06 19:12:22
评测时间
2025-10-06 19:12:22
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes