setting one variable to match another

How do I set one variable to match another, without changing the first?

Example, the user inputs 2, and I want to use that input to set another variable to match
so I want to do input = newnumber

but im going to be looping this to do calculations, using the original input, but the newnumber will change repeatedly. I hope my problem makes sense.
I dont want my input number to match the newnumber after every loop.
Thanks
I hope my problem makes sense.
Not really.
How do I set one variable to match another, without changing the first?


C++ 101:

 
var_a = var_b;


This changes var_a so that is matches var_b, and does not change var_b
Thank you Disch, that is what I thought, but I was trying to overthink the whole thing and wanted to make sure.
Topic archived. No new replies allowed.