Compile Error

foo.cc:10:14: error: 's' does not name a type
 bool u(const s &x, const s &y)
              ^
foo.cc:10:26: error: 's' does not name a type
 bool u(const s &x, const s &y)
                          ^
foo.cc: In function 'bool u(const int&, const int&)':
foo.cc:12:8: error: request for member 'sum' in 'x', which is of non-class type 'const int'
   if(x.sum != y.sum)
        ^~~
foo.cc:12:17: error: request for member 'sum' in 'y', which is of non-class type 'const int'
   if(x.sum != y.sum)
                 ^~~
foo.cc:13:18: error: request for member 'sum' in 'x', which is of non-class type 'const int'
         return x.sum>y.sum;
                  ^~~
foo.cc:13:24: error: request for member 'sum' in 'y', which is of non-class type 'const int'
         return x.sum>y.sum;
                        ^~~
foo.cc:14:15: error: request for member 'chinese' in 'x', which is of non-class type 'const int'
     else if(x.chinese != y.chinese)
               ^~~~~~~
foo.cc:14:28: error: request for member 'chinese' in 'y', which is of non-class type 'const int'
     else if(x.chinese != y.chinese)
                            ^~~~~~~
foo.cc:15:18: error: request for member 'chinese' in 'x', which is of non-class type 'const int'
         return x.chinese>y.chinese;
                  ^~~~~~~
foo.cc:15:28: error: request for member 'chinese' in 'y', which is of non-class type 'const int'
         return x.chinese>y.chinese;
                            ^~~~~~~
foo.cc:16:21: error: request for member 'num' in 'x', which is of non-class type 'const int'
       else return x.num<y.num;
                     ^~~
foo.cc:16:27: error: request for member 'num' in 'y', which is of non-class type 'const int'
       else return x.num<y.num;
                           ^~~
foo.cc: In function 'int main()':
foo.cc:21:3: error: 's' was not declared in this scope
   s a[301];
   ^
foo.cc:26:5: error: 'a' was not declared in this scope
     a[i].num=i;
     ^
foo.cc:30:8: error: 'a' was not declared in this scope
   sort(a+1,a+1+n,u);
        ^
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
比赛
2021.6.25期末考试结束庆祝赛
语言
C++
递交时间
2021-06-28 17:28:14
评测时间
2021-06-28 17:28:14
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes