how are these functions different?

void f1(int & k)
{ k = k + 1;}

void f2(int * k)
{ (*k) = (*k) + 1; }

void f3(int * & k)
{ (*k) = (*k) + 1; }

They all do the same thing. From compiler point of view, how are f1, f2, f3 different? They all take a reference and change the value stored in it.
When would one be preferred over the other?
Topic archived. No new replies allowed.