how to declare a vector iterator c++ code example Example: declaring iterator in cpp vector<int>::iterator ptr;