First time posting here. I have problem about referencing a typedef struct from separate files. Example:

main.c //menus and variables declaration

```
#include <stdio.h>
#include <string.h>
#include "person.h"
#include "person.c"

person persondata[50] ;

```

---

person.h //typedef struct{...}person;

```
typedef struct
{
    char name[50];
}person;

```

---

person.c //functions

```
extern persondata[];

void copy()
{
    strcpy(persondata[0].name, "John");
}

```

I keep getting error: left of ".name" must have struct/union type and redefinition, different basic types

How am I supposed to fix this reference?