Lets say I have this
int x = 0;
int y = 0;
int z = 0;
const int v = 50;
//change x,y,z
x += v;
y += v;
z += v;
Its fine, but is there a shorter way to avoid this 3 lines of code (with +=) and have only one? I just asking myself, because I have to add some const to these variables very often and then I have to add always +3 lines (or more if I would have xyz+ variables).
If this is going to happen very often, you might want to put these in a class. For example, if these are locations within a virtual page:
That way, you can change their values independently or collectively.