You've resized the vector to size len.
This crates len objects in the vector using their default constructor.
So when you pushback()
another object it's in place len+1.
The object in cell 0 is actually one of the default constructed objects.
What I think you wanted to do is use reserve() just to have enough room for the objects.
If n is greater than the current container size, the content is expanded by inserting at the end as many elements as needed to reach a size of n. If val is specified, the new elements are initialized as copies of val, otherwise, they are value-initialized.
If n is greater than the current vector capacity, the function causes the container to reallocate its storage increasing its capacity to n (or greater).