www.delorie.com/archives/browse.cgi | search |
From: | "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk> |
To: | djgpp AT delorie DOT com |
Date: | Thu, 4 Apr 1996 10:24:08 GMT |
Subject: | pointer arithmetic (was: Re: How to code Interrupts in C?) |
Message-ID: | <4869407C92@fs2.mt.umist.ac.uk> |
In djgpp, int=4 bytes=dword, short=2 bytes=word, char=1 byte=byte. If sizeof(mymode)=X, adding Y to a mymode* pointer actually adds X*Y to the RAM address which it contains, so that if the mymode* is pointing to one element in a mymode[] array, adding Y to the pointer steps the pointer on by Y array elements.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |