Hello,
I have to overload "<" and ">" operators. So I do:
now I want to use operator "<" to overload ">":Code:bool bignum::operator<(const bignum& a) { // here is some code comparing *this and a. }
and I get a compile error:Code:bool bignum::operator>(const bignum& a) { return a < *this; }
Can anyone help me ?main.cpp: In member function `bool bignum::operator>(const bignum&)':
main.cpp:157: error: passing `const bignum' as `this' argument of `bool bignum::operator<(const bignum&)' discards qualifiers
--
Regards,
apacz