Hi i am writting a rational number class which has overloaded operators.I am a bit confused woth the isstream operator because i am not sure how it fits in with my code.I want to be able to read in a string and parse it to where it belongs .if i do this
Code:
istream & Rational:: operator>>(istream &s,Rational c){
}
i do not know what to do.I know that the rational numbers input might look like this " 3/2 + 4/3 - 2 * 0" which represents just one rational number but i do not know if that should be passed in as in instream to the method argument and be tokenized and parsed to the member variables.