Possible Duplicate:
overloading >> for a fraction class C++
So I need to read in a line from the command line.
Prints out instructions, and then prompts for input. Looks as below.
Type your first fraction: 8/27
Now the point is we're supposed to overload istream >> to be able throw the 8 into a fraction class as the numerator and 27 as the denominator, but I can't for the life of me figure out how. I've tried .getline and trying to convert from char to int, I've got everything working inputting the 8 THEN the 27, but can't get '8/27' as an input to work. Any advice as to where I should be heading?