www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/10/21:52:30

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Dynamically declaring 2-d arrays
Date: Tue, 10 Feb 1998 19:10:19 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 29
Message-ID: <34E0EC6B.CA9@cs.com>
References: <199802101907 DOT UAA00439 AT acp3bf DOT physik DOT rwth-aachen DOT de>
NNTP-Posting-Host: ppp224.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hans-Bernhard Broeker wrote:
> 
> This sets up a large, *contiguous* array a_inner, and a set of
> pointers into that array. To access Element a[k][j], you can do any of
> the following, whichever seems fit for the situation at hand:
> 
>         a[0][k*m+j];
>         a_inner[k*m+j];
>         a[k][j];

Wow, thanks!  It's not every day you learn something new and useful. 
:-)

> (BTW: I first learned about this from the comp.lang.c FAQ. If you don't
> have that, go get it. It's about the most valuable source of information
> you'll ever get about C in general, only second to the original work
> itself: K&R2)

I read the comp.lang.c FAQ frequently, but there is a LOT of information
in there.  For those who don't know, the URL is
http://www.eskimo.com/~scs/C-faq/top.html.

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "Always listen to experts.  They'll  |
|       aka Fighteer I       | tell you what can't be done, and why.|
|   mailto:fighteer AT cs DOT com   | Then do it."                         |
| http://www.cs.com/fighteer/|                - Lazarus Long        |
---------------------------------------------------------------------

- Raw text -


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