Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
Math code snippet to sum all positive elements in a container.
There are multiple ways to implement SumPositives:
int SumPositives(const std::vector<int>& v) |
template<typename InputIterator, typename ElementType, typename Predicate> |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.