Skip to content

Glossary: C++ Beyond the Basics

std::accumulate

Also written: accumulate

An algorithm from `<numeric>` that adds up a range starting from a given value. The start value's type is the total's type, so use `0LL` to avoid `int` overflow.

Where the book teaches it

Related terms

Algorithm