2019-09-04から1日間の記事一覧

STLの逆イテレーター

CPP

rbegin()とrend()を使う。逆順なんだけどイテレータは加算でOK。 for (auto ite = map.rbegin(); ite != map.rend(); ++ite) { .... } ネタ元 https://marycore.jp/prog/cpp/reverse-iterator-rbegin-rend/