
22 Feb
2006
22 Feb
'06
5:51 p.m.
yinglcs2@yahoo.com wrote:
I have a for loop which pass the map.second to a function, like this: class A; typedef map
MyMap; sortY(A& a);
for (MyMap::iterator iter = map.begin(); iter != map.end(); ++iter) { A *a = (*iter).second;
sortY(*a); }
how can I translate the above for() loop into for_each and use boost lambda?
I didn't test the following, but it should work :)
#include