Different output on GDB and on Visual Studio (CPP, C++)
I tried to write a program in CPP which gets an infix expression, turns it into a postfix expression and then calculates the expression.
I thought what I wrote works because I ran several tests on it on Visual Studio. But I don’t know why, the tests have result X on Visual Studio and result Y on GDB. For an example, when I run the program and enter (5+3)*((20/10)+(8-6)) on Visual Studio, it prints 32. On GDB, on the other hand, it prints 0.