title: The difference between using fstream constructor and open function
body: <p>I have a simple question about the constructor of fstream and the .open function.
  Are there any differences between the following two expression?</p>
  <h1>1</h1>
  <pre><code>fstream(&quot;file.txt&quot;,ios::app);
  </code></pre>
  <h1>2</h1>
  <pre><code>fstream fin;
  fin.open(&quot;file.txt&quot;,ios::app);
  </code></pre>
  <p>For (1), I don't need to use .open function again right? Any functional differences between the two expression?</p>
  <p>My second question is that if I left the openmode empty, what will be the default open mode?</p>