Problem addition
User 3lvian
Submission Time 2023-03-11 00:37:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

addition.cpp: In function ‘int main()’:
addition.cpp:8:7: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::istream’ {aka ‘std::basic_istream<char>’})
8 | cout << cin >> a + cin >> b;
| ~~~~ ^~ ~~~
| | |
| | std::istream {aka std::basic_istream<char>}
| std::ostream {aka std::basic_ostream<char>}
addition.cpp:8:7: note: candidate: ‘operator<<(int, int)’ <built-in>
8 | cout << cin >> a + cin >> b;
| ~~~~~^~~~~~
addition.cpp:8:7: note: no known conversion for argument 2 from ‘std::istream’ {aka ‘std::basic_istream<char>’} to ‘int’
In file included from /usr/include/c++/9/iostream:39,
from addition.cpp:1:
/usr/include/c++/9/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream&l