Main.cc: In function ‘int main()’:
Main.cc:10:12: error: expected unqualified-id before ‘=’ token
for(int=1;i<=n-1;i++){
^
Main.cc:10:12: error: expected ‘;’ before ‘=’ token
Main.cc:10:12: error: expected primary-expression before ‘=’ token
Main.cc:10:15: error: ‘i’ was not declared in this scope
for(int=1;i<=n-1;i++){
^
Main.cc:10:21: error: expected ‘)’ before ‘;’ token
for(int=1;i<=n-1;i++){
^
Main.cc:10:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
for(int=1;i<=n-1;i++){
^~~
Main.cc:10:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
for(int=1;i<=n-1;i++){
^
Main.cc:10:22: error: ‘i’ was not declared in this scope