2007-09-26から1日間の記事一覧

const_iterator

c++

そんなものがあったのか。 void test(const std::vector<int>& a) { std::vector<int>::iterator p; for (p = a.begin(); p != a.end(); p++) { // 中略 } } …ということはできなくて。。 void test(const std::vector<int>& a) { std::vector<int>::const_iterator p; for (p = </int></int></int></int>…

はてブのコメントにはてなスターをもらうと…

ちょっぴり嬉しくもあるが、そのコメントを編集してもいいものかと悩む。。