记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:11:2: error: unknown type name 'Student'; use 'struct' keyword to refer to the type
  Student s[100001];
  ^~~~~~~
  struct 
/in/foo.c:13:22: error: request for member 'num' in something not a structure or union
   scanf("%d %d",&s[i].num,&s[i].score);
                      ^
/in/foo.c:13:32: error: request for member 'score' in something not a structure or union
   scanf("%d %d",&s[i].num,&s[i].score);
                                ^
/in/foo.c:17:11: error: request for member 'score' in something not a structure or union
    if(s[i].score<s[j].score)
           ^
/in/foo.c:17:22: error: request for member 'score' in something not a structure or union
    if(s[i].score<s[j].score)
                      ^
/in/foo.c:19:14: error: request for member 'num' in something not a structure or union
     s[100000].num =s[i].num ;
              ^
/in/foo.c:19:24: error: request for member 'num' in something not a structure or union
     s[100000].num =s[i].num ;
                        ^
/in/foo.c:20:14: error: request for member 'score' in something not a structure or union
     s[100000].score =s[i].score; 
              ^
/in/foo.c:20:26: error: request for member 'score' in something not a structure or union
     s[100000].score =s[i].score; 
                          ^
/in/foo.c:21:9: error: request for member 'num' in something not a structure or union
     s[i].num =s[j].num; 
         ^
/in/foo.c:21:19: error: request for member 'num' in something not a structure or union
     s[i].num =s[j].num; 
                   ^
/in/foo.c:22:9: error: request for member 'score' in something not a structure or union
     s[i].score =s[j].score ;
         ^
/in/foo.c:22:21: error: request for member 'score' in something not a structure or union
     s[i].score =s[j].score ;
                     ^
/in/foo.c:23:9: error: request for member 'num' in something not a structure or union
     s[j].num =s[100000].num ;
         ^
/in/foo.c:23:24: error: request for member 'num' in something not a structure or union
     s[j].num =s[100000].num ;
                        ^
/in/foo.c:24:9: error: request for member 'score' in something not a structure or union
     s[j].score =s[100000].score ;
         ^
/in/foo.c:24:26: error: request for member 'score' in something not a structure or union
     s[j].score =s[100000].score ;
                          ^
/in/foo.c:26:11: error: request for member 'score' in something not a structure or union
    if(s[i].score==s[j].score)
           ^
/in/foo.c:26:23: error: request for member 'score' in something not a structure or union
    if(s[i].score==s[j].score)
                       ^
/in/foo.c:27:12: error: request for member 'num' in something not a structure or union
     if(s[i].num>s[j].num)
            ^
/in/foo.c:27:21: error: request for member 'num' in something not a structure or union
     if(s[i].num>s[j].num)
                     ^
/in/foo.c:29:15: error: request for member 'num' in something not a structure or union
      s[100000].num =s[i].num ;
               ^
/in/foo.c:29:25: error: request for member 'num' in something not a structure or union
      s[100000].num =s[i].num ;
                         ^
/in/foo.c:30:15: error: request for member 'score' in something not a structure or union
      s[100000].score =s[i].score; 
               ^
/in/foo.c:30:27: error: request for member 'score' in something not a structure or union
      s[100000].score =s[i].score; 
                           ^
/in/foo.c:31:10: error: request for member 'num' in something not a structure or union
      s[i].num =s[j].num; 
          ^
/in/foo.c:31:20: error: request for member 'num' in something not a structure or union
      s[i].num =s[j].num; 
                    ^
/in/foo.c:32:10: error: request for member 'score' in something not a structure or union
      s[i].score =s[j].score ;
          ^
/in/foo.c:32:22: error: request for member 'score' in something not a structure or union
      s[i].score =s[j].score ;
                      ^
/in/foo.c:33:10: error: request for member 'num' in something not a structure or union
      s[j].num =s[100000].num ;
          ^
/in/foo.c:33:25: error: request for member 'num' in something not a structure or union
      s[j].num =s[100000].num ;
                         ^
/in/foo.c:34:10: error: request for member 'score' in something not a structure or union
      s[j].score =s[100000].score ;
          ^
/in/foo.c:34:27: error: request for member 'score' in something not a structure or union
      s[j].score =s[100000].score ;
                           ^
/in/foo.c:37:23: error: request for member 'num' in something not a structure or union
  printf("%d %d",s[k-1].num ,s[k-1].score );
                       ^
/in/foo.c:37:35: error: request for member 'score' in something not a structure or union
  printf("%d %d",s[k-1].num ,s[k-1].score );
                                   ^
/in/foo.c:11:10: warning: variable 's' set but not used [-Wunused-but-set-variable]
  Student s[100001];
          ^

信息

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