I made operator for !=
PairXY operator != (PairXY a, PairXY b) {
PairXY res(a.x != b.x, a.y != b.y);
return res;
}
And i want to use it in this loop:
while (l.b!=l.a){}
But it gives me this error: could not convert ‘operator!=(l.Line::b, l.Line::a)’ to ‘bool’, i tried changing operator’s PairXY to bool, but it stil didn’t help.
bool operator != (PairXY a, PairXY b) { … }