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)进行评测。