www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/20/10:08:44

From: Joe Wright <wrightj AT exis DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Custom Stack?
Date: Thu, 20 Feb 1997 07:14:15 -0500
Organization: Alpha Solutions International
Lines: 15
Message-ID: <330C4017.47C9@exis.net>
References: <19970219 DOT 133054 DOT 4935 DOT 2 DOT chambersb AT juno DOT com>
Reply-To: wrightj AT exis DOT net
NNTP-Posting-Host: ppp-2-51.exis.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Benjamin D Chambers wrote:
> 
> Sorry to follow up to my own post, but...
> The problem seemed to go away when I used &buf[10] instead of buf+40.
> Don't ask me why.
> 
> ..Chambers
I didn't see the original post but..  assuming you have 'int buf[20];'
then &buf[10] is the address of the 11th element.  If you want the same
with arithmetic, buf+10 will give you the same address.  Note that both
values will be of type (int *).
-- 
Joe Wright         mailto:wrightj AT exis DOT net
"Everything should be made as simple as possible, but not simpler."
                 --Albert Einstein--

- Raw text -


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