Problem | bracketex |
---|---|
User | vancongloc |
Submission Time | 2025-09-22 16:38:34 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
bracketex.cpp: In function ‘int main()’:
bracketex.cpp:12:12: error: no match for ‘operator||’ (operand types are ‘bool’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
12 | if (n==0||s=""){cout<<"Valid";return 0;}
| ~~~~^~~
| | |
| bool std::string {aka std::__cxx11::basic_string<char>}
bracketex.cpp:12:12: note: candidate: ‘operator||(bool, bool)’ <built-in>
12 | if (n==0||s=""){cout<<"Valid";return 0;}
| ~~~~^~~
bracketex.cpp:12:12: 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 bracketex.cpp:1:
/usr/include/c++/9/bits/valarray_after.h:416:5: note: candidate: ‘template<class _Dom1, class _Dom2> std::_Expr<