title: comparing the variables of a struct
body: <p>I'm not sure if I'm asking the right question. lets say we have the following</p>
  
  <pre><code>    typedef struct {
          char month[2];
          char day[2];
          char year[4];
      } dateT;
  
  void dates(dateT* ptrDateList);   
  
  int main()
  {
      dateT* ptrList;
      scanf("%d", &amp;n);//number of date entries 
      ptrList = malloc(n*sizeof(dateT));
      for (i=0; i&lt;n; i++)
          dates(&amp;ptrList[i]);
  }
  
  void dates(dateT* ptrDateList);
  {
      char inputMonth[2];
      char inputDay[2];
      char inputYear[4];
      scanf("%s",inputMonth);
      strcpy(ptrDateList-&gt;month,inputMonth);
      scanf("%s",inputDay);
      strcpy(ptrDateList-&gt;day,inputDay);
      scanf("%s",inputYear);
      strcpy(ptrDateList-&gt;year,inputYear);
  }
  </code></pre>
  
  <p>how you compare the value of day in ptrList[2] with lets say the value of day in ptrList[5]</p>
  
  <p>I know that if I did </p>
  
  <pre><code>dateT list2={5,10,2009};
  dateT list5={7,10,2009};
  </code></pre>
  
  <p>I could do</p>
  
  <pre><code>list2.day == list5.day
  </code></pre>
  
  <p>but how would I do that with the arrays</p>