C++ examples for STL:vector
Obtain an iterator to the start of vector.
#include <iostream> #include <vector> using namespace std; void show(const char *msg, vector<char> vect); int main() {/*from ww w . j a v a2 s . c o m*/ // 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(); return 0; }