| Author |
Message |
yanne
Joined: 10 Aug 2004 Posts: 6
|
31 Aug 2004 8:22 linked list |
|
|
|
|
can someone explain to me what linked list is,, does anyone have source code which uses linked list???hope you can help me,,
|
|
| Back to top |
|
 |
C-Man
Joined: 19 Jul 2001 Posts: 1235 Helped: 73
|
31 Aug 2004 8:56 Re: linked list |
|
|
|
|
Look for example here:
http://stsdas.stsci.edu/bps/linked_list.html
best regards
|
|
| Back to top |
|
 |
Pinczakko
Joined: 29 Jul 2004 Posts: 142 Helped: 13 Location: Taka Bonerate National Park, Indonesia
|
31 Aug 2004 9:05 Re: linked list |
|
|
|
|
linked list is a linked data structure. AFAIK, most of the time the list is implemented in C or C++ and linked together using a pointer within the data structure (i.e. pointer within the member of the linked list). Usually, "new member" of the list is allocated dynamically in memory using heap allocation function, such as malloc.
Below is an example of singly linked list in C language :
| Code: |
typedef struct s_LIST_MEMBER
{
int value;
struct s_LIST_MEMBER * p_next_member; /* this is the pointer to next linked-list member */
}LIST_MEMBER;
LIST_MEMBER * p_first_member = (LIST_MEMBER*) malloc(sizeof(LIST_MEMBER));
/*
* Now begin to fill the list
*/
p_first_member->value = 20;
p_first_member->p_next_member = (LIST_MEMBER*) malloc(sizeof(LIST_MEMBER));
/*
* Now we have two member, the first member and the second member
* which is pointed to by the first member's p_next_members
* variable.
*/
|
Look for a software engineering or Data Structure book on C/C++ such as Djikstra's book on software engineering for more explanation on it. Also, a lot books for C/C++ language explain about it .
|
|
| Back to top |
|
 |
Google AdSense

|
31 Aug 2004 9:05 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
SISWANTO
Joined: 14 May 2001 Posts: 108 Location: Nirwana
|
31 Aug 2004 11:23 Re: linked list |
|
|
|
|
Hi Yanne,
This is example of link list that You want.
if You have problem with it, please feeling free to PM me.
I was tried, and I never get problem.
Siswanto
|
|
| Back to top |
|
 |