foo.cc: In function ‘int main()’:
foo.cc:24:20: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
24 | if(int j=i+1;j<n;j++)
| ^~~
foo.cc:24:33: error: expected ‘)’ before ‘;’ token
24 | if(int j=i+1;j<n;j++)
| ~ ^
| )
foo.cc:24:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
24 | if(int j=i+1;j<n;j++)
| ^~
foo.cc:24:34: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
24 | if(int j=i+1;j<n;j++)
| ^
foo.cc:24:34: error: ‘j’ was not declared in this scope
foo.cc:21:14: warning: unused variable ‘st’ [-Wunused-variable]
21 | bool st=0;
| ^~