【C++】STL(Standard Template Library)相談室 4at TECH
【C++】STL(Standard Template Library)相談室 4 - 暇つぶし2ch573:デフォルトの名無しさん
05/12/27 00:03:34
>>572
自分ならこんな感じかな?

struct A_eq_id:std::binary_function<A,int,bool>{
    bool operator()(const A&a,int n)const{return a.id == n;}
};

std::vector<A> vect;

std::vector<A>::iterator itr = find_if(vect.begin(),vect.end(),bind2nd(A_eq_id(),2));



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch