2009-07-10から1日間の記事一覧

カンマ区切りの式

C++

comp.lang.c++.moderated - Top 20 C++ Tips of All Time? for文でカンマ区切りの式を使えるのは有名ですが int count = 0; vector<int> v; typedef vector<int>::iterator Iterator; for (Iterator it = v.begin(), last = v.end(); it != last; ++it, ++count); if文</int></int>…