Beispiel

int function(int &a, int &b){
a++;   
return b;
}

Lösung
Verwenden Sie nach Möglichkeit das Schlüsselwort 'const', damit der Compiler es erzwingt, dass Variablen nicht geändert werden.

int function(int &a, const int &b){
a++;   
return b;
}