Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Explanation of what is the linked list

Status
Not open for further replies.

yanne

Newbie level 4
Newbie level 4
Joined
Aug 10, 2004
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
45
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,, :?:
 

Re: linked list

Look for example here:
**broken link removed**

best regards
 

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 :wink:.
 

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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top