View Single Post
Mentor
13May2009,16:26  
xpi0t0s's Avatar
you need back(), not end(). end() returns an iterator that points to the next "free" slot.

http://www.cplusplus.com/reference/stl/vector/back/

(found by plugging "c++ vector" into Google, so not a complex query. TFM is always worth an R.)