记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:12:2: error: unknown type name 'Student'; use 'struct' keyword to refer to the type
  Student x[100000];
  ^~~~~~~
  struct 
/in/foo.c:15:22: error: request for member 'id' in something not a structure or union
   scanf("%d %d",&x[i].id,&x[i].score);
                      ^
/in/foo.c:15:31: error: request for member 'score' in something not a structure or union
   scanf("%d %d",&x[i].id,&x[i].score);
                               ^
/in/foo.c:20:11: error: request for member 'score' in something not a structure or union
    if(x[i].score>x[j].score)
           ^
/in/foo.c:20:22: error: request for member 'score' in something not a structure or union
    if(x[i].score>x[j].score)
                      ^
/in/foo.c:22:5: error: unknown type name 'Student'; use 'struct' keyword to refer to the type
     Student tmp=x[i];
     ^~~~~~~
     struct 
/in/foo.c:26:11: error: request for member 'score' in something not a structure or union
    if(x[i].score==x[j].score && x[i].id<x[j].id)
           ^
/in/foo.c:26:23: error: request for member 'score' in something not a structure or union
    if(x[i].score==x[j].score && x[i].id<x[j].id)
                       ^
/in/foo.c:26:37: error: request for member 'id' in something not a structure or union
    if(x[i].score==x[j].score && x[i].id<x[j].id)
                                     ^
/in/foo.c:26:45: error: request for member 'id' in something not a structure or union
    if(x[i].score==x[j].score && x[i].id<x[j].id)
                                             ^
/in/foo.c:28:5: error: unknown type name 'Student'; use 'struct' keyword to refer to the type
     Student tmp=x[i];
     ^~~~~~~
     struct 
/in/foo.c:35:23: error: request for member 'id' in something not a structure or union
  printf("%d %d",x[n-k].id, x[n-k].score);
                       ^
/in/foo.c:35:34: error: request for member 'score' in something not a structure or union
  printf("%d %d",x[n-k].id, x[n-k].score);
                                  ^

信息

递交者
类型
递交
题目
2-1 比赛榜单
比赛
南师大2018年蓝桥杯热身赛
语言
C
递交时间
2018-12-12 15:17:25
评测时间
2018-12-12 15:17:25
评测机
分数
0
总耗时
13ms
峰值内存
2.918 MiB