making set of custom class cpp 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;
}