title: Comparing chars in C++ - argument of type "char" is incompatible with parameter of type "const char *
body: <p>Im trying to compare 2 values in C++ (which im new to so please go easy)</p>
  
  <pre><code>struct styles{
  int itemNo;
  char desc[26]; 
  char brand[21]; //between 3 - 20
  char category;
  double cost;
  };  
  </code></pre>
  
  <p>struct declared above, then im using this code in another function  </p>
  
  <pre><code>char cat[2];
  for (x=0;x&lt;size;x++)
  {
  
      if (strcmp(cat,styleAr[x].category)==0)
  </code></pre>
  
  <p>its giving me an error with the 'styleAr[x].category' in the if statement:
  <strong>argument of type "char" is incompatible with parameter of type "const char *</strong></p>
  
  <p>any explanations on how I could solve this would be great</p>