Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #2182

Re: linked list

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date Sat, 08 Sep 2012 08:35:20 -0500
Message-ID <504B4998.63CD@mindspring.com> (permalink)
Date Sat, 08 Sep 2012 09:35:20 -0400
From pete <pfiland@mindspring.com>
Reply-To pfiland@mindspring.com
Organization PF
X-Mailer Mozilla 3.04Gold (WinNT; I)
MIME-Version 1.0
Newsgroups comp.programming
Subject Re: linked list
References <k2b694$et0$1@speranza.aioe.org> <50492222.5F6D@mindspring.com> <k2b82r$j0u$1@speranza.aioe.org> <50494540.4AA5@mindspring.com> <k2door$dtr$1@speranza.aioe.org>
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Lines 34
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 4.154.223.191
X-Trace sv3-0vZWjDmlbIxJXVuV3zjCBgd/vUHSzSbYUedyDI3QYKvram9ys9xzRfupJtd39UdAFKvdcFzlkuhuoXZ!1aQvQYkPiRwyCWFK9o8abo/TX1koQj/SXlIBH0hpvi5jNpRmul7f2kLoYd2FndL+ttCY3D2K6aWN!m1dJqbat1xg=
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 1879
Xref csiph.com comp.programming:2182

Show key headers only | View raw


Bill Cunningham wrote:
 
> Do I have your permission to repost
> this code giving you credit of course
> if I have questions later with other
> about linked lists? 

Yes.

All that that last program does 
is to declare a list node type

    struct d_node {
        struct d_node       *next;
        int                 data;
    };

and then to make a linked list by using two functions.

    struct d_node *d_start(int data);
    struct d_node *d_append_0(struct d_node *tail, int data);

and then to display the list data using one function

    int d_fprintf(const struct d_node *node, FILE *stream);

and then to deallocate the list using one function

    void d_free(struct d_node *node);



-- 
pete

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

linked list "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-06 17:58 -0400
  Re: linked list "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-06 18:04 -0400
  Re: linked list pete <pfiland@mindspring.com> - 2012-09-06 18:22 -0400
    Re: linked list "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-06 18:28 -0400
      Re: linked list pete <pfiland@mindspring.com> - 2012-09-06 20:52 -0400
        Re: linked list "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-07 17:25 -0400
          Re: linked list pete <pfiland@mindspring.com> - 2012-09-08 09:35 -0400
  Re: linked list pete <pfiland@mindspring.com> - 2012-09-08 14:49 -0400
  Re: linked list Pascal J. Bourguignon <pjb@informatimago.com> - 2012-10-06 01:32 +0000

csiph-web