title: How to write vector values to a file
body: <p>I have a large vector. </p>
  
  <p>The ways that I use multiply the run-time of the program hugely. The first is write all values to a string as they are calculated using <code>stringstreams</code> and later write the string to a file. The other method is to make a long string after the fact and write that to the file. However, both of these are very slow. </p>
  
  <p>Is there a way to just write the vector's values to the text file immediately with line breaks?</p>