#include<iostream>
#include<vector>
using namespace std;
int main()
{
vector<double> vec_num;
vec_num.push_back(1.1);
vec_num.push_back(1.5);
vec_num.push_back(1.2);
vector<double>::reverse_iterator re_it;
for(re_it = vec_num.rbegin(); re_it != vec_num.rend(); re_it++)
cout << *re_it << endl;
system("pause");
}
反向迭代器reverse_iterator,從rbegin(=end)到rend(=begin-1)反向遍歷,仍然通過++.