title: How to open a text file that's not in the same folder?
body: <p>Since C it's not a language I am used to program with, I don't know how to do this.</p>
  
  <p>I have a project folder where I have all the .c and .h files and a conf folder under which there is a config.txt file to read. How can I open that?</p>
  
  <pre><code>FILE* fp = fopen("/conf/config.txt", "r");
  
  if (fp != NULL)
  {
      //do stuff
  }
  
  else
     printf("couldn't open file\n");
  </code></pre>
  
  <p>I keep getting the error message. Why?</p>
  
  <p>Btw, this only have to work on windows, not linux.</p>
  
  <p>Thanks.</p>