Introduction to OOP | Chapter 20: The STL : | next | previous | audio | real | text |
struct DistancePair { unsigned int first; string second; DistancePair() : first(0) { } DistancePair(unsigned int f, string & s) : first(f), second(s) { } }; bool operator < (DistancePair & lhs, DistancePair & rhs) { return lhs.first < rhs.first; }