Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
int initial = 0;
int total = std::accumulate(std::begin(xs), std::end(xs), initial);
std::cout << total << "\n"; //55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment