Problem sumint
User ansellee
Submission Time 2023-12-19 23:35:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

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