combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:12:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
12 | if(press("A"))a+="A";ex="BXY";
| ^~
combo.cpp:12:38: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
12 | if(press("A"))a+="A";ex="BXY";
| ^~
combo.cpp:13:17: error: expected '}' before 'else'
13 | else a+="B";ex="AXY";
| ^~~~
combo.cpp:11:28: note: to match this '{'
11 | if(press("AB")){
| ^
combo.cpp:13:17: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
13 | else a+="B";ex="AXY";
| ^~~~
combo.cpp:13:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
13 | else a+="B";ex="AXY";
| ^~
combo.cpp:15:13: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
15 | else if(press("X"))a+="X";ex="ABY";
| ^~~~
combo.cpp:15:39: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
15 | else if(press("X"))a+="X";ex="ABY";
| ^~
combo.cpp:16:13: error: 'else' without a previous 'if'
16 | else a+="Y";ex+="ABX";
| ^~~~
combo.cpp:19:9: error: 'else' without a previous 'if'
19 | else if(i==N-1){
| ^~~~
combo.cpp:19:17: error: 'i' was not declared in this scope
19 | else if(i==N-1){
| ^
combo.cpp:21:32: error: could not convert 'ex.std::__cxx11::basic_string<char>::operator[](1)' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
21 | else if(press(ex[1]))a+=ex[1];
| ^
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
combo.cpp:30:5: warning: no return statement in function returning non-void [-Wreturn-type]
30 | }
| ^
combo.cpp: At global scope:
combo.cpp:31:5: error: expected unqualified-id before 'return'
31 | return a;
| ^~~~~~
combo.cpp:32:1: error: expected declaration before '}' token
32 | }
| ^