Example int main() { vector v; string s; while (cin >> s) v.push_back(s); vector::iterator i = find_if( v.begin(), v.end(), compose1( bind2nd(greater(), 7), mem_fun_ref(&string::length))); cout << *i << endl; }