title: How to find next element in a vector C++
body: <p>I am using a <code>vector</code> in a C++ program and I would like to find the next element inside the <code>vector</code> when looping through it, similar to how it would work with a linked list creating a next node. I am planning to use this loop to check the current element in a <code>vector</code> against the next element to see if they are the same. </p>