Figure 1: Using std::string's operator==, find() will first test if "Hammerfall"=="Rainbow", which is false, then test if "Metallica"=="Hammerfall", which is false, and finally test if "Hammerfall"=="Hammerfall", which is true, so find() returns an iterator for the third element.