1. You're close with your '+' function, but you're adding the fraction to itself. I think:

Code:
```value.numerator = (numerator * rat.denominator) + (rat.numerator * denominator);
value.denominator = denominator * rat.denominator;```
will work. The left side of the + sign should be able to be represented by the 'private' variables of your class. I did the rational class about two months ago, and the good news is once you get one to work you'll be able to do the rest in no time.

2. Im starting to understand this now somewhat. My question is
Code:
```value.numerator = (numerator * rat.denominator) + (rat.numerator * denominator);
value.denominator = denominator * rat.denominator;```
how do you know where to place the rat.numerator or rat.denominator

3. Originally posted by Stoned_Coder
No. operator + should always return an object and not a reference. Remember this rule. It will serve you well.
Yep, you are right. I was thinking of the = operator.

4. The rat.numerator and rat.denominator are on the right side of the operator. So, if you are adding:

solution = 2/3 + 3/4

rat.numerator is 3, and rat.denomator is 4.

5. or you could try this:
Code:
```class Rational
{
public:
//do dah
friend Rational & operator * (const Rational & lhs, const Rational & rhs);
//more
};

Rational  operator*(const Rational & lhs, const Rational & rhs)
{
Rational result;
result.numerator = lhs. numerator * rhs.numerator;
result.denominator = lhs.denominator * rhs.denominator;
return result;
}```
you can do a similar syntax (specify the parameters on the left and right hand side) for +. Of course, you need to determine the lowest common denominator just like you do when doing this by hand before you can add the numerators and denominators.

6. Originally posted by Lurker
The rat.numerator and rat.denominator are on the right side of the operator. So, if you are adding:

solution = 2/3 + 3/4

rat.numerator is 3, and rat.denomator is 4.
Thanx for your help I appreciate it. I now understand. Im going to take my final in an hour everyone wish me luck hahahah

7. Most modern compilers support something known as the return value optimisation.
this
Code:
```Rational  operator*(const Rational & lhs, const Rational & rhs)
{
Rational result;
result.numerator = lhs. numerator * rhs.numerator;
result.denominator = lhs.denominator * rhs.denominator;
return result;
}```
is better written as:-
Code:
```Rational operator*(const Rational& lhs,const rational& rhs)
{
return Rational ((lhs.numerator*rhs.numerator),(lhs.denominator*rhs.denominator));
}```
This eliminates the otherwise needed temporary.