Problem | hello |
---|---|
User | YSH2020 |
Submission Time | 2025-03-28 13:17:12 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
hello.cpp: In function ‘int main()’:
hello.cpp:6:19: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘std::basic_istream<char>’)
6 | cout << "Hello " << (cin>>s) << '!';
| ~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~
| | |
| | std::basic_istream<char>
| std::basic_ostream<char>
hello.cpp:6:19: note: candidate: ‘operator<<(int, int)’ <built-in>
6 | cout << "Hello " << (cin>>s) << '!';
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
hello.cpp:6:19: note: no known conversion for argument 2 from ‘std::basic_istream<char>’ to ‘int’
In file included from /usr/include/c++/9/istream:39,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,