Looking for a help

ihatec's Avatar, Join Date: Sep 2010
Go4Expert Member
Hi,
I am new here and I need help, because I have some troubles with C programming language, especially with data structure called linked list.
I know I use structure like this e.g.
struct list
{
char *name;
char *surname;
short age;
struct list *next;
};
and in main function I allocate memory for head pointer and pass to functions.
But for example I want to have name and surname also dynamically alocated and I don't know where to do this. I have seen some functions where list was passed as pointer to pointer (struct list **head) and I want to know when to do this. Is there maybe some good tutorial or a book where I can find the explanation to this problems.
0
virxen's Avatar, Join Date: Nov 2009
Pro contributor
try here
http://cslibrary.stanford.edu/103/
ihatec like this