I know you can do it with an iterator loop, but in this case I need to use an index loop, as as far as I'm aware you can't do '*iterator == *iterator + 1'
However when I run this I get a run time error, I'm presuming it's something to do with the index going beyond the size/scope of the vector?
Line 7: This is going to cause an out of bounds reference when i refers to the last element of the vector (i+1 is out of bounds). Change your for loop to: