🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2370

Newbie Question: Multiple indirection

#2370
From: Erik W. Anderson
Date: Sun, 24 Mar 1996 17:41
38 lines
1654 bytes
Terry Heath wrote:
> I have seen many references in text  I have read about multiple
> indirection (i.e. **p); I seen how to initilize them and so on.  The
> question is:
> 
>   Why would it be necessary to use such a pointer, and when?

/* all credit for this should go to Al Stevens of DJ fame */

#include <stdio.h>

static char *poem[] = {
  " TRAVELLER'S CURSE AFTER MISDIRECTION\n",
  "May they stumble, stage by stage",
  "On an endless pilgrimage,",
  "Dawn and dusk, mile after mile,",
  "At each and every step withal",
  "May they catch their feet and fall;",
  "At each and every fall they take",
  "May a bone within them break;",
  "And may the bone that breaks within",
  "Not be, for variation's sake,",
  "Now rib, now thigh, now arm, now shin,",
  "But always, without fail, THE NECK.\n",
  "                  Robert Graves",
  NULL
};

int main ()
{
  char **cp = poem ;

  while (*cp) puts (*cp++) ;
  return 0 ;
}

=======================================================================To moderator: please excuse this intrusion. If you could post or e-mail
the FAQ for this group, I would be more than willing to read it. Thanks!
Technical Details
Message-ID: <4j41g1$nhq@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4j06lv$7ve@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: "Erik W. Anderson" <eanders@olympic.net>
Newsgroups: comp.lang.c.moderated
Subject: Newbie Question: Multiple indirection
Date: 24 Mar 1996 11:41:21 -0600
Organization: Olympic Net
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4j41g1$nhq@solutions.solon.com>
References: <4j06lv$7ve@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com
X-Mailer: Mozilla 2.0GoldB1 (Win95; I)