Boost logo

Boost Users :

From: Delfin Rojas (drojas_at_[hidden])
Date: 2004-08-31 15:55:23


What errors do you get?

-delfin

> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Maximilian W.
> Sent: Tuesday, August 31, 2004 11:36 AM
> To: boost-users_at_[hidden]
> 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 <stdlib.h>
> #include <boost/lambda/lambda.hpp>
> #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 <stdlib.h>
> #include "/users/user2/ugrad/m/mdw45/boost_1_31_0/boost/lambda/lambda.hpp"
> #include <testIf.h>
> #include <vector>
> #include <easylist.hpp>
> #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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net