2 Sep
2009
2 Sep
'09
5:12 p.m.
Hello,
I am testing the following sample code on page 264 of the book "Beyond the C++ Standard Library" and got an error msg: "result_type' : is not a member of '`global namespace'' from MSVC 2008 Pro compiler. Can anyone point out what is wrong with it? Thanks. std::for_each(m.begin(), m.end(), boost::bind(&print_size(), boost::ref(std::cout), _1));
That should read: std::for_each(m.begin(), m.end(), boost::bind(print_size(), boost::ref(std::cout), _1)); In your code there's an ampersand before print_size() that shouldn't be there. Did it really look like that in the book? Cheers, Bjorn Karlsson www.skeletonsoftware.net