【初心者歓迎】C/C++室 Ver.59【環境依存OK】 at TECH
[2ch|▼Menu]
662:デフォルトの名無しさん
08/04/14 16:59:15
>>660

#include <iostream>
#include <algorithm>
#include <set>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>

int main() {
  namespace bll=boost::lambda;
  std::set<int> a,b;
  a.insert(1);
  a.insert(2);
  a.insert(3);
  b.insert(2);
  b.insert(3);

  std::remove_copy_if(a.begin(), a.end(),
                      std::ostream_iterator<int>(std::cout),
                      bll::bind(std::find<std::set<int>::iterator, int>,
                                b.begin(),
                                b.end(),
                                bll::_1 ) == b.end());

  return EXIT_SUCCESS;
}

uu-n...


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

4163日前に更新/246 KB
担当:undef