Quote (thundercock @ Nov 14 2013 10:45am)
Thanks for the link, I will read it.
Alright...
My understanding now is that the function doStuff in the code above is creating two new variables x and y with whatever values are input, which then go out of scope as soon as the function stops executing, and when I get back into main, I'm using the x and y declared in main.
If I change it to:
doStuff(int &x, int &y)
then I'm not longer creating new variables in doStuff, but rather referencing the same variables from main.
Does that sound right?
This post was edited by smashT on Nov 14 2013 01:00pm