iterator for vector of vector c++ code example Example: declaring iterator in cpp vector<int>::iterator ptr;