Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Looking for a help (http://www.go4expert.com/forums/looking-help-t23172/)

ihatec 2Sep2010 03:57

Looking for a help
 
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.

virxen 2Sep2010 11:17

Re: Looking for a help
 
try here
http://cslibrary.stanford.edu/103/


All times are GMT +5.5. The time now is 18:41.