Question: what is the difference between iterator and const_iterator?
Answer: As you can see, iterators come in two varieties: std::iterator and const_iterator. The distinction is that a dereferenced iterator returns a pointer, while a const_iterator returns a const pointer. This means that the value referenced by a const_iterator may not be altered.