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


Groups > comp.programming > #2182

Re: linked list

Message-ID <504B4998.63CD@mindspring.com> (permalink)
Date 2012-09-08 09:35 -0400
From pete <pfiland@mindspring.com>
Organization PF
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>

Show all headers | 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