Hi everyone. I am a beginner at C++ and am having some problems with the language. I would appreciate any advice that could be given on this issue.
I cannot figure out how to modify variables! Take this for example.
Say you have four variables, 1A, 1B, 1C, and 1D. You start off with 1A, however would eventually like to transform 1A into 1B. Say you have this equation: 1A + 2 = Answer
In time, you no longer would like to use 1A, but need to use 1B instead of 1A. How would you go about replacing the letter on the variable (A) and putting a different one (B) there in its place?
You could just write another equation to solve for this problem, but what if your code is a mutating type and you cannot predict the need for such modifications without running it first, but to run it, you need to accommodate such modifications? or what if the portion you would like to modify can be 100000 different combinations; surely it is far too tedious to write 100000 derivations of the code.
I mainly want to know how to do this so that I can have a program evolve its own variables and therefore change how it operates over a period of time.