1 2 3 4 5 6 7 8
void foo(int *ptr) { *ptr = 10; } // call: int a; foo(&a);
void foo(int& ref) { ref = 10; } // call: int a; foo(a);