Yeah, an operator has precedence, but that precedence is not unique, so looping through the operators by precedence is not enough. You would need to map a precedence value to multiple operators. An array of vectors would probably be the best choice.
However, I doubt this is the best way to evaluate an expression, because you can have parenthesis, which can force lower priority operators to be evaluated first.