
26 Jul
2005
26 Jul
'05
8:11 a.m.
This piece of sample code demonstrates my problem quite well:
#include alist;
while(in!="end")
{
in="";
std::getline(std::cin,in);
alist.push_back(new A(in));
}
std::for_each(alist.begin(),alist.end(),
_1->print_A()); // This is line 30
return 1;
}
----
Using g++ ( 3.??) and the latest boost, I get this error:
main.cpp: In function `int main()':
main.cpp:30: error: base operand of `->' has non-pointer type `const
boost::lambda::lambda_functor