#include <iostream>
#include <vector>
#include <algorithm>

class x {
  int n;
public:
  x(int n) { this->n = n; }
  void operator()(int v) { std::cout << n << " : " << v << std::endl; }
};

int const n = 10;
int main() {
  x a(10), b(100);
  std::vector<int> v;
  for (int i = 0; i < n; i++) v.push_back(i);
  std::for_each(v.begin(), v.end(), a);
  std::for_each(v.begin(), v.end(), b);
  return 0;
}
/* end */
