Problem | typo |
---|---|
User | duck |
Submission Time | 2023-11-10 16:08:50 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
typo.cpp: In function ‘int main()’:
typo.cpp:5:40: error: no match for ‘operator&&’ (operand types are ‘bool’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
5 | for (int i = 0; i < a.length() - 1 && output = "Yes"; i++) {
| ~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~
| | |
| bool std::string {aka std::__cxx11::basic_string<char>}
typo.cpp:5:40: note: candidate: ‘operator&&(bool, bool)’ <built-in>
5 | for (int i = 0; i < a.length() - 1 && output = "Yes"; i++) {
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
typo.cpp:5:40: note: no known conversion for argument 2 from ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘bool’
In file included from /usr/include/c++/9/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from ty