Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:20: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    7 |         for(int i;i=1;i<=t;i++)
      |                   ~^~
/in/foo.cc:7:24: warning: for increment expression has no effect [-Wunused-value]
    7 |         for(int i;i=1;i<=t;i++)
      |                       ~^~~
/in/foo.cc:7:27: error: expected ')' before ';' token
    7 |         for(int i;i=1;i<=t;i++)
      |            ~              ^
      |                           )
/in/foo.cc:7:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    7 |         for(int i;i=1;i<=t;i++)
      |         ^~~
/in/foo.cc:7:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
    7 |         for(int i;i=1;i<=t;i++)
      |                            ^
/in/foo.cc:7:28: error: 'i' was not declared in this scope
/in/foo.cc:13:27: error: 'p' was not declared in this scope
   13 |                 if(a>0.1&&p<=20)
      |                           ^

信息

递交者
类型
递交
题目
P3009 手机电量显示202512GESP1级T2
比赛
2026.1.10初级班结业测试
语言
C++
递交时间
2026-01-10 14:28:48
评测时间
2026-01-10 14:28:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes