Main.cc: In function ‘int main()’:
Main.cc:7:22: error: ‘i’ was not declared in this scope
for(int a=1;a<=n;i++)
^
Main.cc:7:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
for(int a=1;a<=n;i++)
^~~
Main.cc:14:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
return 0;
^~~~~~