Is it possible to increment an integer
value by reference?
int counterA = 0;
int counterB = 0;
int counter = (condition) ? counterA : counterB;
//use counter
counter++;
Result: both counterA + counterB will remain = 0, instead being incremented.