>i.e. * before / etc
Multiplication and division have the same precedence.
>i dont know how to get the code to look at each operand in a string of chars.
You would save yourself a lot of trouble by using a stack to either build a parse tree, or convert the infix notation to postfix. That way you solve two problems: operator precedence, and parenthesis ordering of the expression if any. A search on google will give you plenty of information on converting infix to postfix.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401