Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
This is the answer of Exercise #9: No for-loops.
Replace the for-loop. You will need std::for_each and std::mem_fun_ref.
#include <vector> |
#include <algorithm> |
#include <algorithm> |
Instead of using a functor, use a lambda expressions.
#include <algorithm> |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.