File tree 1 file changed +4
-10
lines changed
1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,11 @@ class Rational
23
23
return denomanator;
24
24
}
25
25
26
- friend Rational operator +(const Rational &left, int right);
27
- // Bfriend ostream operator << (ostream&out, const Rational& object);
28
- friend ostream &operator <<(ostream &out, const Rational &object);
26
+ friend Rational &operator +(const Rational &left, int right);
29
27
30
- // friend void display (ostream& out, const Rational& value) {}
28
+ friend ostream & operator << (ostream & out, const Rational &object);
31
29
32
- // friend bool operator < (const Rational& left, const Rational& right);
30
+
33
31
friend bool operator <(int a, const Rational &left)
34
32
{
35
33
if (a < left)
@@ -40,11 +38,7 @@ class Rational
40
38
return true ;
41
39
}
42
40
43
- // friend Rational operator+( const Rational& left, int right){}
44
-
45
- // friend void operator+ ( const Rational& left, int right){}
46
-
47
- // friend void operator+ (const Rational&left, int right) {}
41
+
48
42
49
43
private:
50
44
int numerator;
You can’t perform that action at this time.
0 commit comments