Problem exam
User NateDhaliwal
Submission Time 2025-09-19 15:16:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exam.cpp: In function ‘int main()’:
exam.cpp:8:15: error: no match for ‘operator==’ (operand types are ‘std::basic_ostream<char>’ and ‘int’)
8 | cout << page == 1 ? "Hello World" : both;
| ~~~~~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_ostream<char>
exam.cpp:8:15: note: candidate: ‘operator==(int, int)’ <built-in>
8 | cout << page == 1 ? "Hello World" : both;
| ~~~~~~~~~~~~~^~~~
exam.cpp:8:15: note: no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘int’
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 exam.cpp:1:
/usr/include/c++/9/bits/postypes.h:222:5: note: candidate: ‘template<class _StateT> bool std::operator==(const