prog.cpp: In function ‘int arraySum(int*, int)’:
prog.cpp:6:12: error: ‘accumulate’ was not declared in this scope
return accumulate(a, a+n, initial_sum);
^~~~~~~~~~
prog.cpp: In function ‘int main()’:
prog.cpp:13:5: error: ‘cout’ was not declared in this scope
cout << arraySum(a, n);
^~~~
prog.cpp:13:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
prog.cpp:1:1:
+#include <iostream>
using namespace std;
prog.cpp:13:5:
cout << arraySum(a, n);
^~~~