title: fopen not work with XCode
body: <p>The function <code>fopen(FILE *fp)</code> in XCode it's not working, I put the text file in the root directory, but not work, it's weird because, executing from terminal works fine, but executing from IDE not.</p>
  
  <p>The sintax that I use it's this:</p>
  
  <pre><code>FILE *fp=fopen("name.txt", "r");
  if(fp==NULL)
  {
      printf("the text file can't be opened");
      exit(0);
  }
  else
      return fp;
  </code></pre>
  
  <p>And always return <code>NULL</code>.</p>