title: How do I compare a char string with argv in C?
body: <p>I'm trying to compare a character string with the argv argument. </p>
  
  <p>I have this in my main:</p>
  
  <pre><code>int main(int argc, char *argv[]) 
  </code></pre>
  
  <p>Now if I write </p>
  
  <pre><code>if (argv[2] == 'squared') 
  </code></pre>
  
  <p>the IDE tells me that I have a multiple character constant or that the char* is too long for its type or something similiar. </p>
  
  <p>Is there a way to compare argv to a character string? I've even used strcmp but that gives me a segmentation fault when the program runs. </p>
  
  <p>I also tried a for loop and incremented argv[i] but that gave me an error too. </p>
  
  <p>Maybe I'm missing something?</p>