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