c++ set with structs, set.find() function making error 'invalid comparator'

I make set of structs. My struct has one array with length 8 inside as pointer. If I insert some structs to the set, it's okay. But when I try to find, error('invalid comparator') occurs. Here is my code.
struct Key { int* arr; }; bool operator<(const Key& a, const Key& b) { for (int i = 0; i < 8; i++) { if (a.arr[i] == b.arr[i]) { continue; } else { return a.arr[i] < b.arr[i]; } } return true; } bool operator==(const Key& a, const Key& b) { for (int i = 0; i < 8; i++) { if (a.arr[i] != b.arr[i]) { return false; } } return true; } set<Key> visit; visit.insert(initKey); ...... Key key; key.arr = newcandidate; visit.find(key); > trigger error.
I want to add arrays to somewhere. Then I want to find some arrays in there fastly. So I try to use 'set' structures. What do I need to do to solve this problem? Thank you very much for your reading.

You need to define properly only operator<. The operator== is not relevant to the set. You should return false at last row. The relation is strict. It shouldn't be possible to have a < b and b < a, but your operator is defined to be a < a.