Introduction to OOP Chapter 20: The STL : next previous audio real text

Representing a Distance

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; }
Intro OOP, Chapter 20, Slide 17