One good way to do this is to produce a 'BNF' for your expressions. Lookup BNF or 'Backus Nauer Form' to get a clear definition, but it is what compiler writiers use to specify the syntax of their language, and from it, you can easily build a parser. This way, the operator precedence just 'falls out' from the description.
For a calculator with just */+- this may be overkill, but heck maybe you'll want to expand the calculator to allow parens () or other stuff too!
Here's a fragment of the C++ BNF dealing with expressions, just to give you an idea; this isn't pure BNF form, but heck it's what's in the C++ help :-) :
additive-expression:
multiplicative-expression
additive-expression + multiplicative-expression
additive-expression – multiplicative-expression
multiplicative-expression:
segment-expression
multiplicative-expression * segment-expression
multiplicative-expression / segment-expression
multiplicative-expression % segment-expression
segment-expression:
pm-expression
segment-expression :> pm-expression
pm-expression:
cast-expression
pm-expression .* cast-expression
pm-expression –>* cast-expression
cast-expression:
unary-expression
( type-name ) cast-expression
And so on. You can see how you could build routines called, say, 'AdditiveExpression' and have it in turn call other routines and itself recursively to see if the expression is MultiplicativeExpression, or AdditiveExpression followed by a plus or minus followed by a MultiplicativeExpression.
Like I say, this may be overkill for a simple 'four-banger' calculator, but it would allow you to make a much more powerful calculator with parens and exponents and mod and the like.