2007-04-22から1日間の記事一覧

find_if

c++

昨日、書いた関数オブジェクトを使うと、argorithmのfind_ifが使えます。以下は、例です。 #include <iostream> using namespace std; template<class T> struct Less_than{ T value; Less_than(const T& v) : value(v){} bool operator()(const T& v) const { return v</class></iostream>