arrays, anyone?
Roy Smith
roy at phri.UUCP
Fri Sep 6 10:34:57 AEST 1985
> > Now, in C 2-d arrays are simply an array of pointers to a linear array.
>
> Slight misconception here. In C, multi-dimensional arrays are *not*
> arrays of pointers to linear arrays.
Ah, but they could be if you were willing to do all the memory
allocation and pointer set-up yourself. I was and I did. I posted a
little routine called arrayalloc to mod.sources a month or so back which
does just what you are talking about here. If you are interested, look
through your archives for the following or write me and I'll send you a
copy.
Subject: run-time memory allocation for multi-dimensional arrays
Message-ID: <1010 at genrad.UUCP>
Date: 13 Aug 85 11:59:49 GMT
Mod.sources: Volume 2, Issue 36
Submitted by: decvax!allegra!phri!roy (Roy Smith)
--
Roy Smith <allegra!phri!roy>
System Administrator, Public Health Research Institute
455 First Avenue, New York, NY 10016
More information about the Comp.lang.c
mailing list