title: How to instantiate an fstream if you declare it as a member of a class?
body: <p>What constructor can you use to instantiate an fstream if you declare it as a member of a class?</p>
  
  <pre><code>#include &lt;fstream&gt;
  class Foo {
  Foo();
  // not allowed
  std::fstream myFile("\\temp\\foo.txt", fstream::in | fstream::out | fstream::trunc);
  
  // allowed
  std::fstream myFile;
  }
  </code></pre>
  
  <hr>
  
  <pre><code>// constructor
  Foo::Foo() {
  // what form of myFile("\\temp\\foo.txt", fstream::in | fstream::out | fstream::trunc)  can I use here?
  
  
  myFile = ???
  }
  </code></pre>