combo.cpp: In function 'std::string guess_sequence_sequence(int)':
combo.cpp:51:23: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
51 | if (guess_sequence("A")) {
| ^~~
| |
| const char*
In file included from combo.cpp:2:
combo.h:5:32: note: initializing argument 1 of 'std::string guess_sequence(int)'
5 | std::string guess_sequence(int N);
| ~~~~^
combo.cpp:51:22: error: could not convert 'guess_sequence(int)()' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
51 | if (guess_sequence("A")) {
| ~~~~~~~~~~~~~~^~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:54:23: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
54 | if (guess_sequence("B")) {
| ^~~
| |
| const char*
In file included from combo.cpp:2:
combo.h:5:32: note: initializing argument 1 of 'std::string guess_sequence(int)'
5 | std::string guess_sequence(int N);
| ~~~~^
combo.cpp:54:22: error: could not convert 'guess_sequence(int)()' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
54 | if (guess_sequence("B")) {
| ~~~~~~~~~~~~~~^~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:57:23: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
57 | if (guess_sequence("X")) {
| ^~~
| |
| const char*
In file included from combo.cpp:2:
combo.h:5:32: note: initializing argument 1 of 'std::string guess_sequence(int)'
5 | std::string guess_sequence(int N);
| ~~~~^
combo.cpp:57:22: error: could not convert 'guess_sequence(int)()' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
57 | if (guess_sequence("X")) {
| ~~~~~~~~~~~~~~^~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:64:22: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
64 | if (guess_sequence("AB")) {
| ^~~~
| |
| const char*
In file included from combo.cpp:2:
combo.h:5:32: note: initializing argument 1 of 'std::string guess_sequence(int)'
5 | std::string guess_sequence(int N);
| ~~~~^
combo.cpp:64:21: error: could not convert 'guess_sequence(int)()' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
64 | if (guess_sequence("AB")) {
| ~~~~~~~~~~~~~~^~~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:65:23: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
65 | if (guess_sequence("A")) {
| ^~~
| |
| const char*
In file included from combo.cpp:2:
combo.h:5:32: note: initializing argument 1 of 'std::string guess_sequence(int)'
5 | std::string guess_sequence(int N);
| ~~~~^
combo.cpp:65:22: error: could not convert 'guess_sequence(int)()' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
65 | if (guess_sequence("A")) {
| ~~~~~~~~~~~~~~^~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:73:23: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
73 | if (guess_sequence("C")) {
| ^~~
| |
| const char*
In file included from combo.cpp:2:
combo.h:5:32: note: initializing argument 1 of 'std::string guess_sequence(int)'
5 | std::string guess_sequence(int N);
| ~~~~^
combo.cpp:73:22: error: could not convert 'guess_sequence(int)()' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
73 | if (guess_sequence("C")) {
| ~~~~~~~~~~~~~~^~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
combo.cpp:83:21: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
83 | while (res.size() < N) {
| ~~~~~~~~~~~^~~
combo.cpp:84:19: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
84 | if (res.size() == N - 1) {
| ~~~~~~~~~~~^~~~~~~~
combo.cpp:85:28: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int'
85 | if (guess_sequence(res + rem.at(0))) {
| ~~~~^~~~~~~~~~~
| |
| std::__cxx11::basic_string<char>
In file included from combo.cpp:2:
combo.h:5:32: note: initializing argument 1 of 'std::string guess_sequence(int)'
5 | std::string guess_sequence(int N);
| ~~~~^
combo.cpp:87:35: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int'
87 | } else if (guess_sequence(res + rem.at(1))) {
| ~~~~^~~~~~~~~~~
| |
| std::__cxx11::basic_string<char>
In file included from combo.cpp:2:
combo.h:5:32: note: initializing argument 1 of 'std::string guess_sequence(int)'
5 | std::string guess_sequence(int N);
| ~~~~^
combo.cpp:93:122: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int'
93 | int l = guess_sequence(res + rem.at(0) + res + rem.at(1) + rem.at(0) + res + rem.at(1) + rem.at(1) + res + rem.at(1) + rem.at(2));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
| |
| std::__cxx11::basic_string<char>
In file included from combo.cpp:2:
combo.h:5:32: note: initializing argument 1 of 'std::string guess_sequence(int)'
5 | std::string guess_sequence(int N);
| ~~~~^
combo.cpp:94:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
94 | if (l == res.size()) {
| ~~^~~~~~~~~~~~~
combo.cpp:96:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
96 | } else if (l == res.size() + 1) {
| ~~^~~~~~~~~~~~~~~~~