title: Comparing c strings to char using strcmp
body: <p>I'm trying to count spaces using c strings. I can't use std strings. And on the line comparing the two chars I get the error 'invalid conversion from 'char' to 'const char*'. </p>
  
  <p>I understand that I need to compare two const chars* but I'm not sure which one is which. I believe sentence[] is the char and char space[] is const char* is that right? And I need to use some sort of casting to convert the second but I'm not understanding the syntax I guess. Thanks for the help &lt;3</p>
  
  <pre><code>int wordCount(char sentence[])
  {
      int tally = 0;
      char space[2] = " ";
  
      for(int i = 0; i &gt; 256; i++)
      {
          if (strcmp(sentence[i], space) == 0)
          {
              tally++
          }
      }
  
      return tally;
  }
  </code></pre>