Figure 15.1 A Weighted Graph
class charCompare {public: bool operator () (const char * left, const char * right) const { return strcmp(left, right) < 0; }
};
Using charCompare, define the cityInfo data type as;
typedef map <const char *, unsigned int,
charCompare> cityInfo;
Previous slide
Next slide
Back to first slide
View graphic version