www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/07/06:30:16

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Thomas Hansen <thomas DOT hansenNOSPAMORILLSUEYOURXXX AT adramatch DOT com>
Newsgroups: comp.lang.c++,comp.os.msdos.djgpp
Subject: Re: ** Pointer thingie's <= what's up with the double *?
Date: Mon, 07 Jan 2002 12:11:16 +0100
Organization: adra match asa
Lines: 39
Message-ID: <790j3u0l4qlvq0c59r1uuirhpa550m30pc@4ax.com>
References: <vTkS7.469287$Jy2 DOT 33400140 AT news DOT quicknet DOT nl> <9vcma8$gjt$06$1 AT news DOT t-online DOT com> <_4lS7.469306$Jy2 DOT 33404928 AT news DOT quicknet DOT nl>
NNTP-Posting-Host: 193.71.234.202
Mime-Version: 1.0
X-Trace: oslo-nntp.eunet.no 1010401900 21100 193.71.234.202 (7 Jan 2002 11:11:40 GMT)
X-Complaints-To: abuse AT KPNQwest DOT no
NNTP-Posting-Date: 7 Jan 2002 11:11:40 GMT
X-Newsreader: Forte Agent 1.8/32.553
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Fri, 14 Dec 2001 12:11:48 +0100, there came a drop of sanity from
"Emile Bosch" <emilebosch AT hotmail DOT com> containing:

>whoosh that was a FAST reply =) Thanks!! I think i understand it now, have
>to bring it
>to real life with an example though!
>
>is this a good example of it?:
>
>int c;
>int *ptr;
>int **fptr;
A fairly good sample is :


void GetInt(int **ppInt);

int main()
{
  int * ppInt;
  GetInt(&ppInt);
}

void GetInt(int **pointer)
{
 *pointer = new int[50];
 for(int n=0;n<50;n++)
    (*pointer)[n] = n*14+26;
}

Things like this would be "impossible" to do without pointers to
pointers...

BTW!
Just wrote this directly into my newsreader, don't know if it works...
[snip]
-- 
"FOOT-AND-MOUTH BELIEVED TO BE FIRST VIRUS
UNABLE TO SPREAD THROUGH MICROSOFT OUTLOOK"

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019