in case you're not up on your stl, recall that for iterators the dereference operator returns the current object, so the line inside the for loop in the preceding snippet is equivalent to
equally clearly, int or double may not: find uses the expression *first, and the dereference operator makes no sense for an object of type int or of type double.