How can I use a C++ unordered_set for a custom class?
Since this is the top Google result on Stack Overflow for C++ unordered_set of objects I’ll post a simple yet completely illustrative and copy/paste runnable example: // UnorderedSetOfObjects.cpp #include <iostream> #include <vector> #include <unordered_set> struct Point { int x; int y; Point() { } Point(int x, int y) { this->x = x; this->y = y; … Read more