Let\'s say you have a function that modifies a variable.
Should you write it like this: void myfunc(int *a) or like this void myfunc(int &a)>
void myfunc(int *a)
void myfunc(int &a)>
Something to note, if you are using stl functors, it is easier if the parameter matches the container value type.
void foo(Bar *); void frobnicate(vector vecBars) { for_each(vecBars.begin(), vecBars.end(), ptr_fun(&foo)); }
The above code is much harder if foo takes Bar&