记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:15:2: error: unknown type name 'Score'
  Score ss[26];
  ^~~~~
/in/foo.c:15:2: note: use 'struct' keyword to refer to the type
/in/foo.c:20:8: error: request for member 'zimu' in something not a structure or union
   ss[i].zimu= 97+i;
        ^
/in/foo.c:21:21: error: request for member 'score' in something not a structure or union
   scanf("%d", &ss[i].score);
                     ^
/in/foo.c:27:14: error: request for member 'score' in something not a structure or union
    if(ss[j-1].score<ss[j].score)
              ^
/in/foo.c:27:26: error: request for member 'score' in something not a structure or union
    if(ss[j-1].score<ss[j].score)
                          ^
/in/foo.c:29:16: error: request for member 'score' in something not a structure or union
     tmp=ss[j-1].score; ss[j-1].score=ss[j].score; ss[j].score=tmp;
                ^
/in/foo.c:29:31: error: request for member 'score' in something not a structure or union
     tmp=ss[j-1].score; ss[j-1].score=ss[j].score; ss[j].score=tmp;
                               ^
/in/foo.c:29:43: error: request for member 'score' in something not a structure or union
     tmp=ss[j-1].score; ss[j-1].score=ss[j].score; ss[j].score=tmp;
                                           ^
/in/foo.c:29:56: error: request for member 'score' in something not a structure or union
     tmp=ss[j-1].score; ss[j-1].score=ss[j].score; ss[j].score=tmp;
                                                        ^
/in/foo.c:30:20: error: request for member 'zimu' in something not a structure or union
     char tp=ss[j-1].zimu; ss[j-1].zimu=ss[j].zimu; ss[j].zimu=tp;
                    ^
/in/foo.c:30:34: error: request for member 'zimu' in something not a structure or union
     char tp=ss[j-1].zimu; ss[j-1].zimu=ss[j].zimu; ss[j].zimu=tp;
                                  ^
/in/foo.c:30:45: error: request for member 'zimu' in something not a structure or union
     char tp=ss[j-1].zimu; ss[j-1].zimu=ss[j].zimu; ss[j].zimu=tp;
                                             ^
/in/foo.c:30:57: error: request for member 'zimu' in something not a structure or union
     char tp=ss[j-1].zimu; ss[j-1].zimu=ss[j].zimu; ss[j].zimu=tp;
                                                         ^
/in/foo.c:37:15: error: request for member 'zimu' in something not a structure or union
   ans[i]=ss[i].zimu;
               ^
/in/foo.c:15:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
  Score ss[26];
        ^~

信息

递交者
类型
递交
题目
(lpj 1-4)Best name
比赛
新年 小兰赛2019-1-1
语言
C
递交时间
2019-01-01 10:37:51
评测时间
2019-01-01 10:37:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes