CPP STL - shivamvats/notes GitHub Wiki

  1. accumulate: Templated function that can also be passed an operator.:

    #include <numeric> // accumulate
    #include <functional> //multiplies
    int sum = std::accumulate(values.begin(), values.end(), 0);
    int product = std::accumulate(
                  values.begin(), valued.end, 1, std::multiplies<int>());
    
⚠️ **GitHub.com Fallback** ⚠️