title: XCode c++ file reference
body: <p>I'm trying to write a few algorithm programs practising for Google Code Jam but I can't get XCode to read from an input file (easily).</p>
  
  <p>I have added the file to the project and it appears in the left hand file navigation bar.  But I can't reference it relatively.  In Code::Blocks I just input from "FileName.txt" and it works but with XCode it just can't find it.</p>
  
  <p>If I put the full file path (i.e. /Users/myname/Documents/Google Code Jam/ProjectName/ProjectName/FileName.txt) then it works but that just seems ridiculous.</p>
  
  <p>Is there anything I can do to get XCode to work?  When I added the file I ticked the copy file into project directory and also the add to target executable.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks!</p>