
Thanks for help, but I want to assign the value of the member variable not the pointer itself: vector<boost::shared_ptr<clss> > tmp for(size_t i=0; i<tmp.size(), i++) tmp[i]->mem = 0.0; In this case clss::mem should be changed, I get an error doing std::for_each(tmp.begin(), tmp.end(), &_1::mem = 0); Can this be done? Thanks for help ___________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is prohibited. Please refer to http://www.bnpparibas.co.uk/en/information/legal_information.asp?Code=ECAS-8... for additional disclosures.