search example int main() { string s = "this is a sentence"; char w[ ] = "is"; string::iterator r = search(s.begin(), s.end(), w, w + strlen(w)); cout << "Found " << w << " at " << r - s.begin() << endl; }