Problem sumint
User jovan
Submission Time 2025-05-15 22:14:45
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:12:29: error: request for member ‘begin’ in ‘arr’, which is of non-class type ‘int [n]’
12 | int total = accumulate(arr.begin(, arr.end(), 0, plus<int>());
| ^~~~~
sumint.cpp:12:35: error: expected primary-expression before ‘,’ token
12 | int total = accumulate(arr.begin(, arr.end(), 0, plus<int>());
| ^
sumint.cpp:12:41: error: request for member ‘end’ in ‘arr’, which is of non-class type ‘int [n]’
12 | int total = accumulate(arr.begin(, arr.end(), 0, plus<int>());
| ^~~