I was given the assignment to create a postfix converter and then evaluator using a stack class we created in class.
My problem is this, I believe that my algorithm is correct but for some reason, the numbers that are being outputted are WAY off base and don't make much sense. If I run the calculator, input a 0, then press "=" (solve button) it will output a 48. 2 will output a 50. 3 a 51 and so on. No idea why so I am asking for some help. I imagine it has to do with the way I'm implementing my stack class but I thought it was great.
Heres my code on pastebin. The Stack class first, Postfix converter, Postfix evaluator, and finally the Calculator GUI that puts it all together.
Any and all help is greatly appreciated.
1 Replies - 315 Views - Last Post: 06 April 2013 - 10:08 PM
Replies To: Postfix Evaluator Giving Really Weird Numbers from Stack
Re: Postfix Evaluator Giving Really Weird Numbers from Stack
Posted 06 April 2013 - 10:08 PM
Please post your code here, using code tags: . If you have a lot of code, a minimal viable (runnable) sample that illustrates your problem is best to post.
Page 1 of 1