title: Xcode & passing command line arguments
body: <p>I just started working with C &amp; Xcode and I've run into a little difficulty.</p>
  
  <p>All I want to do is read a file from the command line and see the output in the terminal.
  I think my problem lies with the path to the file that I want to read in. I'm using a Mac and the file is on my desktop, so the path should be <code>Users/myName/Desktop/words.txt</code>. Is this correct?</p>
  
  <p>This is my code:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  int main (int argc, const char* argv[]){
  
      if(argc == 1){
          NSLog(@" you must pass at least one arguement");
          return 1;
      }
      NSLog(@"russ");
      FILE*  wordFile = fopen(argv[1] , "r");
      char word[100];
  
      while (fgets(word,100,wordFile)) {
  
          NSLog(@" %s is %d chars long", word,strlen(word));
  
      }
  
      fclose(wordFile);
      return 0;
  
  }//main
  </code></pre>