foo.cc: In function 'void BubbleSort(int*, int, int)':
foo.cc:23:7: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17'
23 | if(a[j-1]>a[j]
| ^
foo.cc:23:18: error: expected ';' before '{' token
23 | if(a[j-1]>a[j]
| ^
| ;
24 | {
| ~
foo.cc:23:13: warning: statement has no effect [-Wunused-value]
23 | if(a[j-1]>a[j]
| ~~~~~~^~~~~
foo.cc:30:3: error: expected primary-expression before 'if'
30 | if(sucess==true)
| ^~
foo.cc:29:8: error: expected ')' before 'if'
29 | }
| ^
| )
30 | if(sucess==true)
| ~~
foo.cc:23:6: note: to match this '('
23 | if(a[j-1]>a[j]
| ^
foo.cc:21:8: warning: unused variable 'sucess' [-Wunused-variable]
21 | bool sucess=true;
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务