First of all, does anyone have a link to a page that offers a tutorial on C linked lists? I have one here, but I can't seem to understand it very well.
Ok now for my question. I see that in changing the data of an element in a list, you use the -> operator. I may be totally missing something, but I don't know what the -> operator does. Can anyone explain it to me? I saw it like this:
struct person {
char name[20];
struct person *next;
};
struct person *new;
struct person *head;
head = NULL;
new = (person*)malloc(sizeof(struct person));
new->next = head;
head = new
Thanks for you assistance.



LinkBack URL
About LinkBacks



You don't need the \0 at the end of the string, it's already null terminated as it is a string literal.