The problem here is that you are making a a call to the getInput function by copy, not by reference.
If you replace this line:
void getInput(int input1, int input2)
with this:
void getInput(int& input1, int& input2)
and change the prototype as well, you might be in better shape. I'm not a a computer with a compiler right now, so I can't check it.
__________________
"I can't understand why people are frightened of new ideas. I'm frightened of the old ones." -- John Cage (1912 - 1992)
|