다음을 통해 공유


accumulate (STL/CLR)

Computes the sum of all the elements in a specified range including some initial value by computing successive partial sums or computes the result of successive partial results similarly obtained from using a specified binary operation other than the sum.

template<class _InIt, class _Ty> inline
    _Ty accumulate(_InIt _First, _InIt _Last, _Ty _Val);
template<class _InIt, class _Ty, class _Fn2> inline
    _Ty accumulate(_InIt _First, _InIt _Last, _Ty _Val, _Fn2 _Func);

Remarks

This function behaves the same as the STL numeric function accumulate. For more information, see accumulate.

Requirements

Header: <cliext/numeric>

Namespace: cliext

See Also

Reference

numeric (STL/CLR)