Compile Error

/in/foo.cc: In lambda function:
/in/foo.cc:20:59: error: invalid use of member function 'double student::BMI()' (did you forget the '()' ?)
   20 |         sort(st+1,st+n+1,[](student x,student y){return x.BMI>y.BMI;});
      |                                                         ~~^~~
      |                                                              ()
/in/foo.cc:20:65: error: invalid use of member function 'double student::BMI()' (did you forget the '()' ?)
   20 |         sort(st+1,st+n+1,[](student x,student y){return x.BMI>y.BMI;});
      |                                                               ~~^~~
      |                                                                    ()

信息

递交者
类型
递交
题目
P3131 身高体重指数 GESP202606四级T2
语言
C++
递交时间
2026-07-19 10:02:53
评测时间
2026-07-19 10:02:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes