Originally Posted by
Junky
I was the one to advise you in your other post.
Search the web for info about postfix. You should find a algorithm to do it. Why should you change to postfix? Because it makes evaluation so much easier. 1 + 2 * 3 becomes 1 2 3 * +. Then you read the postfix expression. Each time you read an operand you push it onto a Stack. Each time you read an operator you pop 2 values off the Stack, perform operation and push result back onto Stack.
Read 1
Push onto Stack
Read 2
Push onto Stack
Read 3
Push onto Stack
Read *
Pop 3
Pop 2
Multiply
Push 6 onto Stack
Read +
Pop 6
Pop 1
Add
Push 7 onto Stack
Now you have finished reading the postfix expression and the result is the only value left on the Stack: 7.
If this is too much for you then I suggest attempting something simpler.
Oh it's not, I've done harder. Trust me haha. Thanks though, I just didn't know what a postfix was and didn't bother to google it. I tend to do ignorant things like that when I'm really busy. But, thanks, you were a big help, really haha. I'm gonna keep at this, I'm waaaayyyy too stubborn to give up. Go big or go home haha.