Need a little help with a computer science project. Involves the EOF marker to stop operation of program

Jay59express

Senior member
Jun 7, 2000
481
0
0
Here is the deal, i wrote a program that uses a class, and let the user input a fraction in the form of "3/5" for example. The way it works is that it calls a member function of the class which looks like this:
{
char temp;
input >> frac.numer >> temp >> frac.denom;
return input;
}

what I need to be able to do is have the user enter the EOF thing instead of the 1st fraction and have the program halt.
The input is setup like this:

1st Fraction (or EOF to quit): [user input]
Operator: [user input]
2nd Fraction: [user input]

I have no clue how to do this! The program needs to loop until the user gives the EOF keystroke (ctrl + z, correct?).

Any help would be great!