combo.cpp: In function 'char binary_search(const string&)':
combo.cpp:4:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | if (press(str+"A"+str+"B")==str.size()) {
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
combo.cpp:5:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
5 | return ((press(str+"X")==str.size()) ? 'Y' : 'X');
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
combo.cpp:8:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
8 | return ((press(str+"A")==str.size()) ? 'B' : 'A');
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
combo.cpp: In function 'char get_next(const string&)':
combo.cpp:35:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
35 | if (longest_pfx==str.size()) {
| ~~~~~~~~~~~^~~~~~~~~~~~
combo.cpp:38:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
38 | else if (longest_pfx==str.size()+1) {
| ~~~~~~~~~~~^~~~~~~~~~~~~~
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:50:21: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
50 | while (ret.size()+2<=N) {
| ~~~~~~~~~~~~^~~
combo.cpp:54:21: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
54 | while (ret.size()+1<=N) {
| ~~~~~~~~~~~~^~~