Problem sumint
User fueh
Submission Time 2023-02-04 16:26:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:11:7: error: no match for ‘operator+=’ (operand types are ‘long long int’ and ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’})
11 | sum += cin >> y;
| ~~~~^~~~~~~~~~~
sumint.cpp:11:7: note: candidate: ‘operator+=(long long int&, int)’ <built-in>
sumint.cpp:11:7: note: no known conversion for argument 2 from ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} to ‘int’