combo.cpp:27:5: error: ambiguating new declaration of 'long long int press(std::string)'
27 | int press(string p);
| ^~~~~
In file included from combo.cpp:1:
combo.h:7:5: note: old declaration 'int press(std::string)'
7 | int press(std::string p);
| ^~~~~
combo.cpp: In function 'std::string guess_sequence(long long int)':
combo.cpp:35:48: error: could not convert 'f' from 'char' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
35 | char f = getBeginChar(); if(N == 1) return f; vector<string> againstChar;
| ^
| |
| char
combo.cpp:41:37: error: invalid types 'char[int]' for array subscript
41 | string mergeString = pre + f[0] + pre + f[1] + f[0] + pre + f[1] + f[1] +
| ^
combo.cpp:41:50: error: invalid types 'char[int]' for array subscript
41 | string mergeString = pre + f[0] + pre + f[1] + f[0] + pre + f[1] + f[1] +
| ^
combo.cpp:41:57: error: invalid types 'char[int]' for array subscript
41 | string mergeString = pre + f[0] + pre + f[1] + f[0] + pre + f[1] + f[1] +
| ^
combo.cpp:41:70: error: invalid types 'char[int]' for array subscript
41 | string mergeString = pre + f[0] + pre + f[1] + f[0] + pre + f[1] + f[1] +
| ^
combo.cpp:41:77: error: invalid types 'char[int]' for array subscript
41 | string mergeString = pre + f[0] + pre + f[1] + f[0] + pre + f[1] + f[1] +
| ^
combo.cpp:42:16: error: invalid types 'char[int]' for array subscript
42 | pre + f[1] + [2];
| ^
combo.cpp:42:23: error: expected identifier before numeric constant
42 | pre + f[1] + [2];
| ^
combo.cpp: In lambda function:
combo.cpp:42:25: error: expected '{' before ';' token
42 | pre + f[1] + [2];
| ^
combo.cpp: In function 'std::string guess_sequence(long long int)':
combo.cpp:44:37: error: invalid types 'char[int]' for array subscript
44 | if(answer == M + 1) pre += f[0]; else if(answer == M + 2) pre += f[1]; else {
| ^
combo.cpp:44:75: error: invalid types 'char[int]' for array subscript
44 | if(answer == M + 1) pre += f[0]; else if(answer == M + 2) pre += f[1]; else {
| ^
combo.cpp:45:21: error: invalid types 'char[int]' for array subscript
45 | pre += f[2];
| ^
combo.cpp:48:12: error: 'answer' was not declared in this scope
48 | return answer;
| ^~~~~~