title: C++ substitution of ios::noreplace
body: <p>I'm using fstream to open a file for write. I don't want to overwrite an existing file so after some searching, I found ios::noreplace. But when I compile this:</p>
  
  <pre><code>#include &lt;fstream&gt;
  using namespace std;
  //......Did something else.
  ofstream fout;
  fout.open(outputFile,ios::noreplace);//outputFile is a C string
  </code></pre>
  
  <p>I get an error</p>
  
  <pre><code> error: ‘noreplace’ is not a member of ‘std::ios’
  </code></pre>
  
  <p>I'm just wondering is there any std:: subsitution for ios::noreplace?</p>