http://www.cplusplus.com/reference/stl/vector/insert/

if you want to print to file you might find fstream useful.