delorie.com/archives/browse.cgi | search |
From: | pjotr AT wlink DOT net (pjotr) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Newbie Pointers |
Date: | Wed, 10 Feb 1999 01:22:22 GMT |
Organization: | Posted via RemarQ, http://www.remarQ.com - Discussions start here! |
Lines: | 28 |
Message-ID: | <36c0df47.5699744@news.w-link.net> |
References: | <36BFAABA DOT CDC55472 AT castle DOT on DOT ca> |
NNTP-Posting-Host: | 208.151.227.236 |
X-Trace: | 918610205 T.3QWX1FWE3ECD097C usenet58.supernews.com |
X-Complaints-To: | newsabuse AT remarQ DOT com |
X-Newsreader: | Forte Free Agent 1.11/32.235 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
On Mon, 08 Feb 1999 22:25:47 -0500, "David F. Signoretti" <balboa AT castle DOT on DOT ca> wrote: >Assume: >struct item >{ > int number; > struct item *next_ptr; > struct item *back_ptr; >}; > >Assume double linked list: >(*new_ptr).back_ptr = (struct item *)NULL; > >then: >(*current_ptr).back_ptr = (*new_ptr).back_ptr; > >Does (*current_ptr).bak_ptr = NULL or the address of >(*new_ptr).back_ptr? It's NULL, to get the actual adress of the item that holds the pointer, use: (*current_ptr).back_ptr = &((*new_ptr).back_ptr); Cheers, Pjotr
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |