// This is equivalent to the body of the while-loop in Listing 1. // std::pair<std::string, int> pairNewEntry(strCurrentWord, 0); // 1 std::pair<std::map<std::string, int>::iterator, bool> pairInsertResult = mapWordCount.insert(pairNewEntry); // 2 std::map<std::string, int>::iterator itEntryInMap = pairInsertResult.first; // 3 ++(itEntryInMap->second); End of Listing