Very odd problem. Me and my friends are just trying to make a console based game.
However, i have hit a very strange and confusing problem. After about 70 lines of code, i have a switch statement. However, i try to add two constants (i think they're called that..) that were defined earlier on outside the switch by console input, but the result is totally random and nothing like correct.
for example, outside the switch i have two constants, 'strength' and 'defence' they are both defined as 10 by console input just for testing. But if i try to define a new constant anywhere inside the switch like this:
total = strength + defence;
cout << total;
i get some extremely odd results. Such as 209, 204, 02.
I would paste the entire code but it's nearly 200lines long and some of it still needs sorting out.