friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:10:35: error: no matching function for call to 'accumulate(int*, int*)'
10 | return accumulate(c + 1, c + n);
| ^
In file included from /usr/include/c++/10/numeric:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:84,
from friend.cpp:1:
/usr/include/c++/10/bits/stl_numeric.h:134:5: note: candidate: 'template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)'
134 | accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
| ^~~~~~~~~~
/usr/include/c++/10/bits/stl_numeric.h:134:5: note: template argument deduction/substitution failed:
friend.cpp:10:35: note: candidate expects 3 arguments, 2 provided
10 | return accumulate(c + 1, c + n);
| ^
In file included from /usr/include/c++/10/numeric:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:84,
from friend.cpp:1:
/usr/include/c++/10/bits/stl_numeric.h:161:5: note: candidate: 'template<class _InputIterator, class _Tp, class _BinaryOperation> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation)'
161 | accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
| ^~~~~~~~~~
/usr/include/c++/10/bits/stl_numeric.h:161:5: note: template argument deduction/substitution failed:
friend.cpp:10:35: note: candidate expects 4 arguments, 2 provided
10 | return accumulate(c + 1, c + n);
| ^