title: C- Checking if the first character in the first comand line arguement contains a particular char
body: <p>If the first character of the first argument == "-" then enter the if statement. The error I get is "passing argument 1 of ‘strcmp’ makes pointer from integer without a cast" I have also tried this with fgetc, written a little differently, but still get this error. If I cast it I get a core dump. 
      If the argument contains a dash it would be followed by numbers inside the same argument so I cannot just look at argv[1] as a single char, if I could the condition would be as simple as: <code>if (strcmp(argv[1], "-")==0) </code></p>
  
  <p>Function</p>
  
  <pre><code>int main (int argc, const char *argv[]){
      const char *test = argv[1];
      if (strcmp(test[0],"-")==0)
          {
            printf("saw there was a dash");
          }
      return 0;}
  </code></pre>
  
  <p>Thank you for your help</p>