My Project
examples/containers/vector_buf.cpp

This example code is explained in the Efficient Sequential Reading and Writing to Vectors section.