Compile Error
/in/foo.cc: In function 'int main()':
/in/foo.cc:13:33: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
13 | else if(i==(n/2+1)
| ^
/in/foo.cc:13:43: error: expected ';' before 'cout'
13 | else if(i==(n/2+1)
| ^
| ;
14 | cout<<"-";
| ~~~~
/in/foo.cc:13:34: warning: statement has no effect [-Wunused-value]
13 | else if(i==(n/2+1)
| ~^~~~~~~~~
/in/foo.cc:15:25: error: expected primary-expression before 'else'
15 | else
| ^~~~
/in/foo.cc:14:43: error: expected ')' before 'else'
14 | cout<<"-";
| ^
| )
15 | else
| ~~~~
/in/foo.cc:13:32: note: to match this '('
13 | else if(i==(n/2+1)
| ^
信息
- 递交者
- 类型
- 递交
- 题目
- P2555 小杨的H字矩阵2级2 2023.12
- 语言
- C++
- 递交时间
- 2026-05-25 20:54:02
- 评测时间
- 2026-05-25 20:54:02
- 评测机
- 分数
- 0
- 总耗时
- 0ms
- 峰值内存
- 0 Bytes