I've got the following code:

Code:

#include <iostream>
#include "Fraction.h"
using namespace std;
class Fraction_dup {
friend class Fraction;
public:
void improper (Fraction x);
};

With the following Fraction class:

Code:

class Fraction {
int top, bottom;
public:
Fraction(int a = 0, int b = 1);
~Fraction(){}
//overloading operators
void operator= (Fraction x);
Fraction operator+ (Fraction x);
Fraction operator- (Fraction x);
Fraction operator* (Fraction x);
Fraction operator/ (Fraction x);
//function declarations
void displayFraction();
double toDecimal();
Fraction toFraction(double x) const;
int gcd(int a, int b);
};

But I keep getting the errors such as the following in the improper() definition:

Code:

error C2248: 'Fraction::top' : cannot access private member declared in class 'Fraction'|

What did I do wrong?