c++ create set of class objects code example
Example: storing custom objects in set c++
Add to Class template
bool operator< (const ClassName &other) const
{
return x < other.x;
}
Add to Class template
bool operator< (const ClassName &other) const
{
return x < other.x;
}