/* vpBirthdayArrays.c P. Conrad for CISC105 05F 10.31.05 */
/* show parallel arrays */

#include <stdio.h>

#define MAX_NUM_VPS 100

#define VP_NAME_LENGTH 30

#define BUFSIZE 1024

int main(void)
{

  /* Declare four parallel arrays for 
     the name, birthday month, birthday day, and birth year of
     all of the vice presidents.  We are leaving space for 
     up to 100 vice presidents (defined by MAX_NUM_VPS),
     and each of their names can be up to 30 chars in length,
     defined by VP_NAME_LENGTH */

  char names[MAX_NUM_VPS][VP_NAME_LENGTH];
  int birthdayMonths[MAX_NUM_VPS];
  int birthdayDays[MAX_NUM_VPS];
  int birthdayYears[MAX_NUM_VPS];

  char buffer[BUFSIZE]; /* buffer to read lines from the file */
  
  char *result; /* result of fgets */
  
  int count=0;

  result = fgets(buffer,BUFSIZE,stdin);
  while (result != NULL)
    {

      /* do something with the line of data we read */

      printf("I read this line from the file: %s\n",buffer);
      count++;
      
      /* @@@ NEXT TIME we will split out the data from
	 the string "buffer" into the various arrays... */

      /* try to read the next line */
      result = fgets(buffer,BUFSIZE, stdin);
    }




  for (i=0; i<SIZE; i++)
    {
      if (birthdayDays[i] == day)
	{
	  printf("%s's birthday\n",names[i]);
	  someoneHadABirthday = 1;
	}
    }

  if (!someoneHadABirthday)
    printf("Nobody's birthday\n");



  return 0;

}

