#include #include using namespace std; int main() { string foo( "my cat's breath smells like catfood after it eats food."); size_t first; first = foo.find_first_of( "food"); while (first != string::npos) { cout << first << " " << foo[first] << endl; first = foo.find_first_of( "food", ++first); } return 0; }