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


Groups > comp.programming > #2175

Re: linked list

From "Bill Cunningham" <nospam@nspam.invalid>
Newsgroups comp.programming
Subject Re: linked list
Date 2012-09-06 18:28 -0400
Organization Aioe.org NNTP Server
Message-ID <k2b82r$j0u$1@speranza.aioe.org> (permalink)
References <k2b694$et0$1@speranza.aioe.org> <50492222.5F6D@mindspring.com>

Show all headers | View raw


pete wrote:
>
> /* BEGIN d_append.c */
> /*
> ** Demonstration of use of int list functions.
> */
> #include <stdio.h>
> #include <stdlib.h>
>
> #define NUMBERS         15,14,13,7,20,9,8,12,11,6
>
> #define NMEMB(A)        (sizeof (A) / sizeof *(A))
>
> struct d_node {
>    struct d_node       *next;
>    int                  data;
> };
>
> typedef struct d_node d_type;

    Wow if this is simple I'd hate to see complex. Whew. One step at a time 
I guess.

> int d_fprintf(const d_type *node, FILE *stream);
> d_type *d_append(d_type **head, d_type *tail, int data);

    I've never worked with pointers to pointers. Except in the command line. 
What's head and tail for? I only used next. I don't want to try interation 
and reversing functions yet.

[...]

Bill

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