title: First character of pointer
body: <p>I have a question regarding char pointers.</p>
  
  <p>I am reading a file in C, using <code>fgets</code>. This is a short overview so you can understand what I would like to do:</p>
  
  <pre><code>char configline[configmax_len + 1]; //configmax_len is the max value I need
  while(fgets(configline, sizeof(configline), config){ //config is the file
      char *configvalue = strtok(configline, " ");
      if (configvalue[0] == "#"){
          continue;
      }
      …
  }
  </code></pre>
  
  <p><code>char * configvalue</code> is a pointer to the current line being read. What I would like to check is if the first character of the line is a "#". </p>
  
  <p>However when I do the if statement: <code>if (configvalue[0] == "#")</code>, the compiler throws an error: <code>comparison between pointer and integer</code>. </p>
  
  <p>How could I check if the first character of the string a pointer is pointing to is a certain value?</p>