Boost logo

Boost Users :

From: raulh39_at_[hidden]
Date: 2007-12-07 14:55:26


On Fri, 7 Dec 2007 09:35:47 -0800
"Kobi Cohen-Arazi" <kobi.cohenarazi_at_[hidden]> wrote:

> Hi Folks,
>
> What's wrong with the following simple approach:
>
> ---- Start code ----
>
> using boost::lambda;

Try:
using namespace boost::lambda;

>
> int a[10]

You forgot a semicolon:
int a[10];

> std::for_each(a, a+10, std::cout << _1);
>
> ---- End code ----
>
> It doesn't compile.
> What am I missing here?

If it doesn't compile with this, please copy the error text so we can help you.

OTOH, this complete example works for me:

---- Start code ----
#include <boost/lambda/lambda.hpp>
#include <iostream>

int main()
{
    using namespace boost::lambda;

    int a[10];
    std::for_each(a, a+10, std::cout << _1);
}
---- End code ----

>
> Thanks,
> --
> - Kobi

HTH,
Raul.


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