Problem combo
User Xiaoyang
Submission Time 2023-11-20 21:11:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

combo.cpp: In function ‘std::string guess_sequence(int)’:
combo.cpp:33:16: error: could not convert ‘c.std::vector<char>::operator[](((std::vector<char>::size_type)i))’ from ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} to ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
33 | if(press(c[i]){
| ^
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
combo.cpp:33:17: error: expected ‘)’ before ‘{’ token
33 | if(press(c[i]){
| ~ ^
| )
combo.cpp:38:2: error: expected primary-expression before ‘}’ token
38 | }
| ^
combo.cpp:41:10: error: ‘first’ was not declared in this scope
41 | if(j==first)continue;
| ^~~~~