Hi
I have to pass the address of a member fn taking one argument to the std::for_each. how do i do this?
class A{
void load()
{
vector<int> vt(10,20);
std::for_each(vt.begin(), vt.end(), &A::print);
//It didnt work when i tried mem_fun1(&A::print)
}
void print(int a)
{
cout<<a;
}
};
Thanks