If your compiler supports it, you could use a range based for to access the vector elements:
vector<float> vertices{ 1.0, 2.0, 3.0 };
for(float vertex: vertices){
std::cout << vertex << " ";
}
Prints: 1 2 3 . Note, you can't use this technique for changing the elements of the vector.