ostream& operator<<(std::ostream &output, const Fraction &F)
{
output << F.toString();
return output;
}
//*********************************************
//*******************Stream Insertion**************************
istream& operator>>(std::istream &input, Fraction&value)
{
//Numerator = s.substr(0, i);
//Denominator = s.substr(i, 1);
//s.find('/');
//find the delimniter and call on the substring
int Numerator, Denominator;
input >> Numerator>>Denominator;
value = Fraction(Numerator, Denominator);
return input;
}
Anyways the other way you would have to move line 207 to line 213 then change the 5 to numerator and 7 to denominator also they should probably be integers.
1 2 3 4 5 6 7
int Numerator, Denominator;
cout << "Lets create a fraction! Please enter a value for the numerator." << endl;
cin >> Numerator;
cout << "Please enter a value for the denominator." << endl;
cin >> Denominator;
Fraction Fract(Numerator , Denominator);
Though taking advantage of your operator overloads would be better.