2013-12-01から1ヶ月間の記事一覧
stlのコンテナのfindメンバ関数は、条件に合うものが見つからない場合にendイテレーターを返します。 template <class M, class K> bool containsKey(const M& map, const K& key){ return map.find(key) != map.end( } 使用例 if(containsKey(table, "hoge")){ return table["</class>…
stlのコンテナのfindメンバ関数は、条件に合うものが見つからない場合にendイテレーターを返します。 template <class M, class K> bool containsKey(const M& map, const K& key){ return map.find(key) != map.end( } 使用例 if(containsKey(table, "hoge")){ return table["</class>…