Problem | exam |
---|---|
User | Reality1001 |
Submission Time | 2024-01-31 11:10:32 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
exam.cpp: In function ‘int main()’:
exam.cpp:5:15: error: no match for ‘operator==’ (operand types are ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} and ‘int’)
5 | if (cin >> X == 2){
| ~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
exam.cpp:5:15: note: candidate: ‘operator==(int, int)’ <built-in>
5 | if (cin >> X == 2){
| ~~~~~~~~~^~~~
exam.cpp:5:15: note: no known conversion for argument 1 from ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<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