📜  从头到尾迭代向量 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:45.533000             🧑  作者: Mango

代码示例1
for ( vector::reverse_iterator i = my_vector.rbegin(); 
        i != my_vector.rend(); ++i ) { 
}

OR

vector::iterator i = my_vector.end();
while (i != my_vector.begin())
{
     --i;
    /*do stuff */

}