What errors do you get? -delfin
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Maximilian W. Sent: Tuesday, August 31, 2004 11:36 AM To: boost-users@lists.boost.org Subject: [Boost-users] Newbie learning lambda library
Hi, newbie here. I'm trying to learn the boost lambda library in simple steps, and am getting an error in the following snippet. Apparently, lambda now only allows format& objects as arguments to cout. This puzzles me because all the documentation I've seen on BLL has examples very much like what I"m using. Has there been a design change? Does anyone know what's going on?
Thanks in advance.
Max Wilson
#include <iostream> #include
#include #include <vector> #include <algorithm> using namespace std; using namespace boost::lambda;
int main(int argc, char *argv[]) { vector<int> vec; vec.push_back(1); vec.push_back(2); for_each(vec.begin(), vec.end(), cout << _1 << endl); return 0; }
#include <iostream> #include
#include "/users/user2/ugrad/m/mdw45/boost_1_31_0/boost/lambda/lambda.hpp" #include #include <vector> #include #include <algorithm> using namespace std; using namespace boost::lambda;
int main(int argc, char *argv[]) { vector<int> vec; vec.push_back(1); vec.push_back(2); for_each(vec.begin(), vec.end(), cout << _1 << endl); return 0; }
--
Sometimes I think decisions through, weigh the consequences, decide it is not a good idea, but blind myself and make it anyway. I do not think this is a good thing to do, but it might be. Humans are endowed with both reason and emotion for a reason. -Tara Greenwood _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users