Problem ultimateifelse
User KL
Submission Time 2024-12-04 15:16:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ultimateifelse.cpp: In function ‘int main()’:
ultimateifelse.cpp:22:16: error: could not convert ‘S.std::__cxx11::basic_string<char>::operator=(((int)((char)((((const char*)"world") != 0) && (N == 3)))))’ from ‘std::__cxx11::basic_string<char>’ to ‘bool’
22 | else if (S = "world" && N == 3){
| ~~^~~~~~~~~~~~~~~~~~~
| |
| std::__cxx11::basic_string<char>
ultimateifelse.cpp:26:16: error: could not convert ‘S.std::__cxx11::basic_string<char>::operator=(((int)((char)((((const char*)"hmm") != 0) || (N == 20)))))’ from ‘std::__cxx11::basic_string<char>’ to ‘bool’
26 | else if (S = "hmm" || N == 20){
| ~~^~~~~~~~~~~~~~~~~~
| |
| std::__cxx11::basic_string<char>