list<string>::iterator pos; for (pos = list.begin(); pos != list.end(); ++pos) { string item = *pos; . . . }