I have a struct Person, with a name, id, and number of kids. I'm trying to create a dynamic array for the names, id and number of kids. Keep getting the error "uninitialized local variable 'name' used"
Person *person;
printf("Add a person to the game? (0|1)");
scanf("%c",&dummy);
scanf("%d",&input);
while (input == 1)
{
person->name =(char*)malloc(strlen(arr));
if (person->name == NULL)
return NULL;
person->id = (int*)malloc(ID*sizeof(int));
if (person->id == NULL)
return NULL;
person->kids = (char*)malloc(kidNum * sizeof(char*));
}