title: 'fopen' fails if the file opened in Visual Studio
body: <p>I have the following code:</p>
  
  <pre><code>FILE *fp = fopen( srcFile.filename.c_str(), "rt");
  </code></pre>
  
  <p>srcFile happens to be the solution's main.cpp file, and thus is opened in the solution. <code>fopen</code> returns NULL most of the time (but not when I step into it, which is weird).</p>
  
  <p>However, when I close main.cpp in Visual Studio, the code works. Even when the file is opened in Notepad++.</p>
  
  <p>Is there a workaround?</p>
  
  <p>PS: I tagged it as C, but the file is compiled as C++, IDK if it changes anything.</p>