Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:12: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
    7 |         if(int i=b;i<=c;i++)
      |            ^~~
/in/foo.cc:7:24: error: expected ')' before ';' token
    7 |         if(int i=b;i<=c;i++)
      |           ~            ^
      |                        )
/in/foo.cc:7:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    7 |         if(int i=b;i<=c;i++)
      |         ^~
/in/foo.cc:7:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    7 |         if(int i=b;i<=c;i++)
      |                         ^
/in/foo.cc:7:25: error: 'i' was not declared in this scope

信息

递交者
类型
递交
题目
P2585 小明的幸运数1级2 2023.9
语言
C++
递交时间
2025-02-15 19:01:01
评测时间
2025-02-15 19:01:01
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes