operator+ should be defined like this (with one argument and returning an object):
And likewise for the other operatorsCode:const fraction fraction::operator+(const fraction& fr1 { fraction fr; fr.num = fr1.num* this->denom+ fr.denom * this->num; fr.denom = this->denom * fr1.denom; return fr; }