pos is a pair of iterators. pos.first is the first iterator in pair. pos.first->second derefences the iterator and get a pair of two strings, then returns the second string.