I'm new to programming C++. Consider the following code:
a = 4;
int b = a;
For the code to do what you want, b would need to be a reference to a.
int a; a = 4; int &b = a; b++;