It's not the concept of pointers that is apparently bothering you, but the concept of structures. So don't worry, pointers are relatively easy to understand.
Let's start with your
enqueue
function:
void enqueue(Person *person)
{
strcpy(char *queue[tail], *person.firstName);
strcpy(char *queue[tail], *person.surName);
strcpy(char *queue[tail], *person.persNbr);
}
As person is a pointer to a Person object, all the members of that object are being addressed by
person->
membername. Your
queue
array contains elements of type Person. And hence
queue[n]
is a Person object. Hence, you refer to its members by
queue[n]
.membername. The first line of your function should therefore be:
strcpy (queue[tail].firstname, person->firstName);
Instead of referring to queue[tail] several times, you could equally well define a pointer to that Person object by saying
void enqueue(Person *person)
{
Person* p = &queue[tail];
strcpy (p->firstname, person->firstName);
...
Doesn't that look better? Now one step further. Why do you want to copy the members of your Person structure one-by-one. Let the C compiler do that for you. As your members are all plain data (and no pointers to other objects) you could do the whole copying in a single line:
void enqueue (Person *person)
{
queue[tail] = *person;
And finally, you forgot one important thing: You should have incremented the tail index. So the next time you are entering a person it goes into the next cell of your array. And I guess you have envisioned the nbr_elem variable to hold the number of current queue elements. So you should increment that as well.
Your dequeue function is totally off track, as you might have noticed. The idea should be to do the copying in reverse, just this time take the queue cell with index head as the source. I am not going to provide the source code for that as it is a good exercise for you.
Also, you should do some checking for queue over- and underflow in both functions enqueue and dequeue.