QUOTE(jjhaag @ 14 Oct, 2007 - 07:23 PM)

you should probably be returning a bool (true or false) rather than a Rational(upperval1, upperval2), depending on what the result of the inequality is. without the rest of your class declaration/definition, it's a little hard to tell.
and please post code using the code tags (read the big gray text on the background of the reply box); it makes it way easier to look at and copy/paste your code that way.
-jjh
Oh I see, I will try to do it using bool, this is the class def.
CODE
class Rational{
public:
Rational(int numerator, int denominator);
Rational(int wholenumber);
Rational();//default constructor
public:
void normalize();//will reduce fraction
friend ostream& operator << (ostream& os, const Rational& fraction);//will allow us to output fractions in the form x/y
friend istream& operator >> (istream& is, Rational& fraction);//will allow us to input a fraction in the form x/y
friend bool operator == (Rational &fraction1, Rational &fraction2);
friend bool operator < (Rational &fraction1, Rational &fraction2);
friend const Rational operator + (const Rational &fraction1, const Rational &fraction2);//we can add fractions a/b + c/d
friend const Rational operator - (const Rational &fraction1, const Rational &fraction2);//we can substract fractions a/b - c/d
friend const Rational operator * (const Rational &fraction1, const Rational &fraction2);//we can multiply fractions a/b * c/d
friend const Rational operator / (const Rational &fraction1, const Rational &fraction2);//we can divide fractions a/b / c/d
friend const Rational operator < (const Rational &fraction1, const Rational &fraction2);//will compare both fractions
friend const Rational operator <= (const Rational &fraction1, const Rational &fraction2);//will compare both fractions
friend const Rational operator > (const Rational &fraction1, const Rational &fraction2);//will compare both fractions
friend const Rational operator >= (const Rational &fraction1, const Rational &fraction2);//will compare both fractions
Rational operator ++ (int fraction);//postfix
Rational& operator ++();//prefix
Rational operator -- (int fraction);//postfix
Rational& operator -- ();//postfix
int GCD(int num, int den);//function to get the greatest common denominator of the fraction
private:
int factor;//will define in constructor in order to obtain GCD of the fractions
int m_numerator;//member numerator
int m_denominator;//member denominator
};//end class