Problem shiritori
User jerrielchangjiebin
Submission Time 2024-12-30 13:04:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

shiritori.cpp: In function ‘int main()’:
shiritori.cpp:24:21: error: ‘first’ was not declared in this scope
24 | char last_char = first.back();
| ^~~~~
shiritori.cpp:25:18: error: no match for ‘operator==’ (operand types are ‘char’ and ‘std::__cxx11::basic_string<char>’)
25 | if (last_char == next.substr(0)) {
| ~~~~~~~~~ ^~ ~~~~~~~~~~~~~~
| | |
| char std::__cxx11::basic_string<char>
In file included from /usr/include/c++/9/iosfwd:40,
from /usr/include/c++/9/ios:38,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from shiritori.cpp:1:
/usr/include/c++/9/bits/postypes.h:222:5: note: candidate: ‘template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)’
222 |