Respuesta :

tonb
void addone(int &n) { n++; }

This would do the trick in C++, assuming that's what you're looking for.