title: Request for member `type' in something not a structure or union
body: <p>When Compiled I get the error:</p>
  
  <p>request for member `type' in something not a structure or union,</p>
  
  <p>this error is happening when the strcmp() function is used on a passed char array and pointer to struct. </p>
  
  <p>What I am trying to do is pass in a 'string' and have it return the index in the array where the 'string' is located. </p>
  
  <pre><code>int returnDuplicate(char word , struct data *value)
  {
  
  int i = 0;
  int placefinder = -60;
  
  for (i ; i &lt;= 50 ; i++)
  {
  
    if ( strcmp(word, value.type[i]) == 0)
       {
         placefinder = i;
  
       }
  }
  
  return placefinder;
  }
  
  
  
  
  struct data {
               char type[50][16];
               double whole[50];
               double retail[50];
               double profit[50];
            };
  </code></pre>