combo.cpp: In function 'void checkFor(std::string&, char, char, char)':
combo.cpp:6:22: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
6 | if (s.size() + 1 == r) {
| ~~~~~~~~~~~~~^~~~
combo.cpp:8:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
8 | if (r2 == s.size() + 1) s = s + b + c;
| ~~~^~~~~~~~~~~~~~~
combo.cpp:9:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
9 | else if (r2 == s.size()) s = s + a + c;
| ~~~^~~~~~~~~~~
combo.cpp:12:23: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
12 | else if (s.size() == r) s += c;
| ~~~~~~~~~^~~~
combo.cpp:15:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
15 | if (r2 == s.size()) s = s + b + a;
| ~~~^~~~~~~~~~~
combo.cpp:16:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
16 | else if (r2 == s.size() + 1) s = s + a + b;
| ~~~^~~~~~~~~~~~~~~
combo.cpp: In function 'void checkFinal(char, char, char)':
combo.cpp:21:15: error: 'res' was not declared in this scope; did you mean 'press'?
21 | if (press(res + a) > res.size()) res += a;
| ^~~
| press
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:36:21: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
36 | while (s.size() < n - 1) {
| ~~~~~~~~~^~~~~~~
combo.cpp:42:18: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
42 | if (s.size() < n) {
| ~~~~~~~~~^~~
combo.cpp:43:37: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char'
43 | if (s[0] == 'A') checkFinal(s, 'B', 'X', 'Y');
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:20:29: note: initializing argument 1 of 'void checkFinal(char, char, char)'
20 | inline void checkFinal(char a, char b, char c) {
| ~~~~~^
combo.cpp:44:42: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char'
44 | else if (s[0] == 'B') checkFinal(s, 'A', 'X', 'Y');
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:20:29: note: initializing argument 1 of 'void checkFinal(char, char, char)'
20 | inline void checkFinal(char a, char b, char c) {
| ~~~~~^
combo.cpp:45:42: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char'
45 | else if (s[0] == 'X') checkFinal(s, 'A', 'B', 'Y');
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:20:29: note: initializing argument 1 of 'void checkFinal(char, char, char)'
20 | inline void checkFinal(char a, char b, char c) {
| ~~~~~^
combo.cpp:46:42: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char'
46 | else if (s[0] == 'Y') checkFinal(s, 'A', 'B', 'X');
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:20:29: note: initializing argument 1 of 'void checkFinal(char, char, char)'
20 | inline void checkFinal(char a, char b, char c) {
| ~~~~~^