Feb 22, 2016 at 11:52pm
I'm getting this error when i compile
1 2
|
error: ‘bool Rational::operator>=(Rational, Rational)’ must take exactly one argument
bool operator>=(Rational r1, Rational r2);
|
in my .hpp file
|
bool operator>=(Rational r1, Rational r2);
|
and this is what i have in my .cpp file
1 2 3 4
|
// - r1 >= r2
bool operator>=(Rational r1, Rational r2){
return (r1 - r2).num() >= 0;
}
|
Last edited on Feb 22, 2016 at 11:54pm
Feb 22, 2016 at 11:53pm
seems pretty clear you have too many arguments.