Мне нужно передать параметр в метод, используя постоянную ссылку.
В строке "bool operator == (const Rational x) const;"Я ставлю «&» перед «x», но это не помогает, что мне делать?
class Rational {
private:
int chislitel;
int znum;
public:
Rational(int chislitel, int znum);
Rational();
bool operator==(const Rational x) const;
void Print();
};
.,.
bool Rational::operator==(const Rational x) const
{
if (chislitel * x.znum == znum * x.chislitel)
return true;
else
return false;
}
мое решение -> ошибка