Possible Duplicate:
Evaluating arithmetic expressions in C++
I've created a class that handles rational arithmetic. i.e. has a constructor that accepts strings of the form "a/b", and instantiates an object with object.numerator = a, and object.denominator = b. I've also overload the arithmetic operators to deal with Rational objects.
My question is, I will be reading in lines from a file, such as: "a/b + c/d"
I know how to make sure both operands become Rational objects, but how do I pull the operator from the stream, and use it on the operands?
Thanks!