Problem ultimateifelse
User ryansoh
Submission Time 2023-07-13 12:55:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ultimateifelse.cpp: In function ‘void solve()’:
ultimateifelse.cpp:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | else if (s=="hello") cout<<"world";
| ^~~~~~~
ultimateifelse.cpp:11:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | else if (s=="world" && n==3) cout<<"andss";
| ^~~~~~~
ultimateifelse.cpp:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | else if (s=="hmm" || n==20) cout<<"sus";
| ^~~~~
ultimateifelse.cpp:13:13: error: request for member ‘length’ in ‘s’, which is of non-class type ‘int’
13 | else if (s.length()>5) cout<<"long";
| ^~~~~~
ultimateifelse.cpp:14:13: error: request for member ‘length’ in ‘s’, which is of non-class type ‘int’
14 | else if (s.length()==n) cout<<"equal";
|