#include <string>
#include <map>
#include <iostream>
#include <algorithm>
#include <cstdlib>

typedef std::map<std::string, int> StringIntMap;

void
//f (std::pair<const std::string, int> v)
f (StringIntMap::value_type& v)
{
  std::cout << v.first << ":" << v.second << std::endl;
}

int
main (void)
{
  StringIntMap m;

  m["Fred"] = 5;
  m["Bob"] = 3;

  for_each(m.begin(), m.end(), f);

  return EXIT_SUCCESS;
}
