23 Jul
2008
23 Jul
'08
5:20 a.m.
HI Bruce , it's already in the code .
using namespace boost::lambda; typedef std::istream_iterator<int> in;
std::for_each( in(std::cin), in(), std::cout << (_1 * 3) << " " ); }
-----Original Message----- From: boost-users-bounces@lists.boost.org
HI all, when I try to compile the example code only use boost head-file in
SunOS :
#include
#include <iostream> #include <iterator> #include <algorithm> int main() { using namespace boost::lambda; typedef std::istream_iterator<int> in;
std::for_each( in(std::cin), in(), std::cout << (_1 * 3) << " " ); }
Try this: typedef std::istream_iterator<int> in; std::for_each( in(std::cin), in(), std::cout << boost::lambda::_1*3 << " " ); HTH, Bruce