title: Compare between a char in a string to a given char
body: <p>I have the following:</p>
  
  <pre><code>int findPar(char* str)
  {
  int counter=0;
  
  while (*str) 
  {
      if(str[0] == "(") &lt;---- Warning
      {
          counter++;
      }
      else if (str[0]== ")") &lt;---- Warning
      {
          counter--;
      }
      if (counter&lt;0) 
      {
          return 0;
      }
      str++;
  }
  
  if (counter!=0) 
  {
      return 0;
  }
  return 1;
  }
  </code></pre>
  
  <p>The warning i get is comparison between an int and a char.</p>
  
  <p>I tried to do the comparison (first char in the string vs. given char) also with strcmp like this:</p>
  
  <pre><code>    if (strcmp(str, ")")==0) { stuff }
  </code></pre>
  
  <p>but it never goes in to 'stuff' even when the comparison (should) be correct.</p>
  
  <p>how should i do it? </p>