Hello to all,

Here we go :

Suppose I have a function that takes an int as the only parameter and returns nothing. Let's call it Func1(int).

Suppose, next, that I have a std::vector<int> named coll.

Is there any way to call Func1 for each element in the vector ???

Here's what I tried :
Code:
std::for_each(coll.begin(), coll.end(), std::mem_fun(&Func1));
This doesn't work. I've looked at the bind2st algo in the std but i'm not sure how it works. Can someone help me on this please.

Thanks in advance for any help.

Luc.