title: How to write out to a file and make it return the file
body: <pre><code>int fileReading(string signalFile){
      ofstream fileName;
      fileName.open(signalFile, ios::in | ios::binary);
  
      //does more stuff here
  
  fileName.close();
  return 0;
  </code></pre>
  
  <p>}</p>
  
  <p>How would I create a new file and switch the return type of the function to a file?</p>
  
  <p>Do I need to create a class for this?</p>