Link Lists

Discussion in 'C Programming' started by dmattis, Oct 20, 2003.

  1. dmattis

    dmattis Guest

    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.
     
    dmattis, Oct 20, 2003
    #1
    1. Advertisements

  2. dmattis

    osmium Guest

    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/skyscraper/false/780/linklist.html
     
    osmium, Oct 21, 2003
    #2
    1. Advertisements

  3. dmattis

    CBFalconer Guest

    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 () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
     
    CBFalconer, Oct 21, 2003
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JustSomeGuy

    Sorting lists of lists...

    JustSomeGuy, Jun 17, 2004, in forum: C++
    Replies:
    0
    Views:
    471
    JustSomeGuy
    Jun 17, 2004
  2. Jon Slaughter

    lists of lists

    Jon Slaughter, Dec 13, 2004, in forum: C++
    Replies:
    4
    Views:
    657
    Buster
    Dec 13, 2004
  3. Charlotte Henkle

    Counter for items in lists in lists?

    Charlotte Henkle, Sep 25, 2004, in forum: Python
    Replies:
    8
    Views:
    610
    Charlotte Henkle
    Sep 26, 2004
  4. robin
    Replies:
    10
    Views:
    670
    Dave Hansen
    Apr 12, 2006
  5. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    689
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
  6. yomgui

    list of lists of lists ....

    yomgui, Jul 28, 2006, in forum: Python
    Replies:
    6
    Views:
    532
    yomgui
    Jul 31, 2006
  7. Daniel Nogradi
    Replies:
    3
    Views:
    510
    Dennis Lee Bieber
    Nov 10, 2006
  8. ardief
    Replies:
    14
    Views:
    887
    Paddy
    Feb 3, 2007
Loading...