X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Thomas Hansen 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: <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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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" 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"