I have a std::map that I\'m using to store values for x and y coordinates. My data is very sparse, so I don\'t want to use arrays or vectors, which would result in
std::map
I usually solve this kind of problem like this:
struct Point { int x; int y; }; inline bool operator<(const Point& p1, const Point& p2) { if (p1.x != p2.x) { return p1.x < p2.x; } else { return p1.y < p2.y; } }