Storing a vector object to disk bytewise is highly unlikely to achieve anything useful. It is not even useful to copy them bytewise.

If you want to write a vector of objects to disk then either:
- Write a "header" section first indicating the number of items
- Have some kind of "terminator" that you read that determines when youv'e reached the end of sequence (not recommended)
- Use a whole file so that EOF indicates end of sequence.

Ensure that each object in the vector is output in a way that can be read back.