Hello,
I've written couple of overloaded operators in my file containing Set declarations. I want to use these operators within the declaration file. However it seems it isn't used. Instead it uses the standard operators.
e.g. i have two overloaded operators say <= and ==
bool Set::operator<=(const Set& b) const {
//codes....
return true;
}
bool Set::operator==(const Set& b) const {
if(b.header <= header && header <= header)
//codes....
return true;
}
Inside my overload for == which I use <= it doesn't use my overloaded version of <= instead it uses the standard version. Do I have to write a certain way to use my overloaded operator? or is it some other problems?