From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: arrays of pointers Date: Sun, 26 Oct 1997 14:09:32 -0800 Organization: Alcyone Systems Lines: 29 Message-ID: <3453BF9C.569ABA25@alcyone.com> References: <199710250713 DOT UAA05511 AT fep1-orange DOT clear DOT net DOT nz> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Brett Kosinski wrote: > Actually, I believe this is correct. Are you sure you are malloc'ing > the > pointers before trying to access them? Yes, it's correct. > *tiledata[ptrNum][dataNum].dat <-- you have to dereference the > pointer. This is incorrect. . has higher precedence than *, so this is syntactically wrong. What you meant is (*titledata[ptrNum][dataNum]).dat, or more appropriately, titledata[ptrNum][dataNum]->dat, which is what the -> operator is for. -- Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com Alcyone Systems / http://www.alcyone.com/max/ San Jose, California, United States / icbm://+37.20.07/-121.53.38 \ "After each war there is a little / less democracy to save." / Brooks Atkinson