Your prototype of int get_int_ref() does not declare the function void get_int_ref(int& n).
Technically you declare one function get_int_ref() and define one function get_int_ref(int& n) and your main won't know the later since it is defined after main.
You have to declare it with the parameter types it has.
void get_int_ref(int&);
Next you should be consistent if you want to pass by refence of by value
1 2
n = get_int_ref(); //by value with int get_int_ref();
get_int_ref(&n); //by reference with void get_int_ref(int& n);