prog.cpp:10:2: error: use of undeclared identifier 'printf'
printf("%i\n", x);
^
prog.cpp:12:2: error: no matching function for call to 'funcion'
funcion(&x);
^~~~~~~
prog.cpp:4:6: note: candidate function not viable: no known conversion from 'int *' to 'int &' for 1st argument; remove &
void funcion(int &x);
^
prog.cpp:14:2: error: use of undeclared identifier 'printf'
printf("%i\n", x);
^
3 errors generated.