How do I modify a C++ class so that variables that are assigned multiple values only apply the last value assigned? Currently, the program accepts an expression and it's assignment variables.
ex. (x+y), x=2, y=3; Output: Value = 5 or
(x+2), x=1; Output: Value = 3
Currently, If I assign multiple values to a variable, it applies the first value assigned.
ex. (x+2), x=2, x=10; Output: Value = 4
How do I modify the class so that last value assigned is applied?
ex. (x+2), x=2, x=10; Output: Value = 12
I have attached the main files that are used in the program. I have tried to make the changes in the SymbolTable class but because of my limited expereince with programming and C++ I couldn't get it to compile.