the program crashes when this is called;

this is defination;

bool operator == (const Fraction& f1, Fraction& f2)
{
if (f1==f2)return true;
else return false;
}

this is my calling in the main;

Fraction f1, f2;
cout<<"Enter in the format: 2/4 or 4/9\n";

cout << "enter first fraction: ";
f1.Input();
cout << "enter second fraction: ";
f2.Input();

Fraction result;

result = (f1 == f2);//i think problem lies here.
result.Show();

and this is the prototype of the operator;

friend bool operator == (const Fraction& f1, Fraction& f2);

kindly help me;

class Fraction
{
friend Fraction operator+(const Fraction& f1, const Fraction& f2);
friend Fraction operator-(const Fraction& f1, const Fraction& f2);
friend Fraction operator*(const Fraction& f1, const Fraction& f2);
friend Fraction operator/(const Fraction& f1, const Fraction& f2);

friend bool operator != (const Fraction& f1, Fraction& f2);
friend bool operator == (const Fraction& f1, Fraction& f2);

public:
Fraction();
Fraction(int n, int d=1);

void Input(); // input a fraction from keyboard.
void Show() const; // Display a fraction on screen

int GetNumerator() const;
int GetDenominator() const;

bool SetValue(int n, int d=1);
double Evaluate() const; // Return the decimal value of a fraction

private:
int numerator; // may be any integer
int denominator; // should always be positive
};
Please use code tags when posting code.
sorry @mikeyBoy im new to C++ forums.
the program crashes when this is called;

this is defination;

 ``12345`` ``````bool operator == (const Fraction& f1, Fraction& f2) { if (f1==f2)return true; else return false; }``````

this is my calling in the main;

 ``123456789101112`` ``````Fraction f1, f2; cout<<"Enter in the format: 2/4 or 4/9\n"; cout << "enter first fraction: "; f1.Input(); cout << "enter second fraction: "; f2.Input(); Fraction result; result = (f1 == f2);//i think problem lies here. result.Show();``````

and this is the prototype of the operator;

`friend bool operator == (const Fraction& f1, Fraction& f2);`

and here is the class
 ``123456789101112131415161718192021222324252627`` ``````class Fraction { friend Fraction operator+(const Fraction& f1, const Fraction& f2); friend Fraction operator-(const Fraction& f1, const Fraction& f2); friend Fraction operator*(const Fraction& f1, const Fraction& f2); friend Fraction operator/(const Fraction& f1, const Fraction& f2); friend bool operator != (const Fraction& f1, Fraction& f2); friend bool operator == (const Fraction& f1, Fraction& f2); public: Fraction(); Fraction(int n, int d=1); void Input(); // input a fraction from keyboard. void Show() const; // Display a fraction on screen int GetNumerator() const; int GetDenominator() const; bool SetValue(int n, int d=1); double Evaluate() const; // Return the decimal value of a fraction private: int numerator; // may be any integer int denominator; // should always be positive };``````

kindly help me;

`if (f1==f2)`