2011-06-02から1日間の記事一覧

コンテナの要素をセパレータで連結して表示したい

にあるアルゴリズムが便利すぎます…3 Jun, 00:05 update/ ファンクタの引数がintになってたのを修正、ostream_iteratorのcharTをostreamのcharTに合わせて指定するようにした (thanks for id:SubaruG) #include <iterator> #include <numeric> #include <iosfwd> template <typename charT, typename Traits, typename Sep, typename Iter> inline std::</typename></iosfwd></numeric></iterator>…