// Parses a string that represents a set (i.e., "6-3") by breaking the // string into two substrings and converting those strings to // integers, which are returned via call-by-reference parameters void parse_set(std::string &set, int &games_won, int &games_lost) { int i = set.find('-'); games_won = atoi(set.substr(0,i).c_str()); games_lost = atoi(set.substr(i+1,set.size()-i-1).c_str()); }