掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
ptr_fun(islower)がコンパイルエラー (ID:66703)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
ptr_fun(islower)がコンパイルエラーになるのですが、どう修正したらよいですか? #include <algorithm> #include <cctype> #include <functional> #include <iostream> using namespace std; int my_islower(char c) { return islower(c); } int main() { string s = "abc"; find_if(s.begin(), s.end(), ptr_fun(islower)); // コンパイルエラー find_if(s.begin(), s.end(), ptr_fun(my_islower)); // 問題なし } //コンパイルエラーメッセージ: //error: no matching function for call to `ptr_fun(<unknown type>)' g++ 3.4.4 cygwin
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.