foo.cc: In function 'int main()':
foo.cc:9:4: error: expected ';' before '{' token
   a{++k}=i;
    ^
foo.cc:9:8: warning: statement has no effect [-Wunused-value]
   a{++k}=i;
        ^
foo.cc:8:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int i=x;i<=y;i++)
  ^~~
foo.cc:9:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   a{++k}=i;
         ^
foo.cc:9:9: error: expected primary-expression before '=' token
foo.cc:9:10: error: 'i' was not declared in this scope
   a{++k}=i;
          ^
   
  
    [Hydro](https://hydro.ac)提供评测服务