C++ examples for STL:vector
Declare a reverse iterator for vector.
#include <iostream> #include <vector> using namespace std; void show(const char *msg, vector<char> vect); int main() {//from w w w .j a v a2s . c om // Declare an empty vector that can hold char objects. vector<char> v; // Declare an iterator to a vector<char>. vector<char>::iterator itr; // Obtain an iterator to the start of v. itr = v.begin(); // Declare a reverse iterator. vector<char>::reverse_iterator ritr; return 0; }