Compile Error
foo.cc: In function ‘bool leap(int)’: foo.cc:4:18: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 4 | if(x%4==0&&x%100!=0||x%400==0)return true; | ~~~~~~^~~~~~~~~~ foo.cc: In function ‘int m1(int, int)’: foo.cc:10:26: warning: pointer to a function used in arithmetic [-Wpointer-arith] 10 | else if(m==2)d=28+leap; | ~~^~~~~ foo.cc:10:26: error: invalid conversion from ‘bool (*)(int)’ to ‘int’ [-fpermissive] 10 | else if(m==2)d=28+leap; | ~~^~~~~ | | | bool (*)(int)
信息
- 递交者
- 类型
- 递交
- 题目
- P2881 时间跨越2025.3GESP2级T2
- 语言
- C++
- 递交时间
- 2025-07-19 09:32:10
- 评测时间
- 2025-07-19 09:32:10
- 评测机
- 分数
- 0
- 总耗时
- 0ms
- 峰值内存
- 0 Bytes