g++ 4.7を使用しています。
私がやろうとしているのはこれです、
find_if(s.begin(), s.end(), isalnum);
どこisalnum
で定義されcctype
てs
おり、文字列です。
logman.cpp:68:47: error: no matching function for call to ‘find_if(std::basic_string<char>::const_iterator, std::basic_string<char>::const_iterator, <unresolved overloaded function type>)’
ただし、これは機能しますが、
bool my_isalnum(int c) {
return isalnum(c);
}
find_if(s.begin(), s.end(), my_isalnum);
独自の関数を作成せずにこれを機能させるにはどうすればよいですか?