c++ how to loop through a vector but not the last element code example
Example: c++ how to loop through a vector but not the last element
std::vector vec{1,2,3};
for (int* it{vec.begin()} ; it != std::prev(vec.end()) ; it++)
#Do something
std::vector vec{1,2,3};
for (int* it{vec.begin()} ; it != std::prev(vec.end()) ; it++)
#Do something