Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Link Lists

Reply
Thread Tools

Link Lists

 
 
dmattis
Guest
Posts: n/a
 
      10-20-2003
I am trying to create a linked list of 15 random numbers.
The list is to be populated by inserting new nodes from the front.
Can someone give me an example of how to do this? I'm not sure where
to start.

Thanks.
 
Reply With Quote
 
 
 
 
osmium
Guest
Posts: n/a
 
      10-21-2003
dmattis writes:

> I am trying to create a linked list of 15 random numbers.
> The list is to be populated by inserting new nodes from the front.
> Can someone give me an example of how to do this? I'm not sure where
> to start.


This tutorial might help.

http://www.fortunecity.com/skyscrape.../linklist.html


 
Reply With Quote
 
 
 
 
CBFalconer
Guest
Posts: n/a
 
      10-21-2003
dmattis wrote:
>
> I am trying to create a linked list of 15 random numbers.
> The list is to be populated by inserting new nodes from the front.
> Can someone give me an example of how to do this? I'm not sure
> where to start.


struct node {
....
} *root;

.....
root = NULL;
/* write your code here, you are starting with an empty list */

Now do your homework.

--
Chuck F ((E-Mail Removed)) ((E-Mail Removed))
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of lists of lists of lists... =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==?= Python 5 05-15-2006 11:47 AM
RE: Link Link Link =?Utf-8?B?REw=?= Windows 64bit 0 05-17-2005 12:15 PM
Re: Link Link Link DANGER WILL ROBINSON!!! Kevin Spencer ASP .Net 0 05-17-2005 10:41 AM
lists of lists Jon Slaughter C++ 4 12-13-2004 06:28 PM
Sorting lists of lists... JustSomeGuy C++ 0 06-17-2004 05:44 PM



Advertisments