title: output void function to txt
body: <p>I am only in my second quarter of c++ so please keep answers simple....</p>
  
  <p>I have a pretty messy program with linklist, class, and file i/o
  I am pretty much done with the program but I cant get it to output to a .txt
  It might have been my bad coding layout, since outputting slipped my mind when I wrote this.
  the function in question is:</p>
  
  <pre><code>tag.display_balance(); 
  </code></pre>
  
  <p>note that this function is inside a linklist (tag) that goes into a class and call the function (display_balance) to print the outputs.</p>
  
  <p>everything comes out to the console just fine. but I dont know how to get it save onto a .txt
  a few Google and forum searches didnt show anything that I can understand.
  I tried:</p>
  
  <pre><code>ofstream BilloutPut;
  BilloutPut.open("BillingStatements.txt");
  BilloutPut&lt;&lt; tag.display_balance(); 
  </code></pre>
  
  <p>which is the only way I have learned how to output to a file, but since it is a void function it  didnt work.  I would like to keep away from overloading the &lt;&lt; function if possible.</p>
  
  <p>-Thanks for looking</p>