Hello,
Hi,

I have to write a simple loop whihc assigns a member variable to a constant value,

vector<boost::shared_ptr<clss> > tmp

for(size_t i=0; i<tmp.size(), i++)
        tmp[i]->mem = 0.0;

How this can be done using stl algorithms and boost::bind?
Use Boost.Lambda for this:

std::vector<boost:shared_ptr<class>> tmp;
std::for_each(tmp.begin(), tmp.end(), _1 = 0);

http://www.boost.org/doc/libs/1_44_0/doc/html/lambda/using_library.html#lambda.introductory_examples

Regards,

michi7x7