Removes the last element in the vector, effectively reducing the container size by one.
This destroys the removed element.
Your code calls pop_back in a loop that executes 4 times. Therefore, you remove the last element 4 times. This changes the size of the vector from 10 to 6.