Compile Error
/in/foo.cc: In function 'int sum(int*, int, int)': /in/foo.cc:5:11: warning: pointer to a function used in arithmetic [-Wpointer-arith] sum+=a[i]; ^ /in/foo.cc:5:11: error: assignment of function 'int sum(int*, int, int)' /in/foo.cc:5:11: error: cannot convert 'int (*)(int*, int, int)' to 'int(int*, int, int)' in assignment /in/foo.cc:7:9: error: invalid conversion from 'int (*)(int*, int, int)' to 'int' [-fpermissive] return sum; ^~~
信息
- 递交者
- 类型
- 自测
- 题目
- P1105 连续数之和
- 语言
- C++
- 递交时间
- 2024-10-25 20:14:43
- 评测时间
- 2024-10-25 20:14:43
- 评测机
- 分数
- 0
- 总耗时
- 0ms
- 峰值内存
- 0 Bytes