Article View: comp.lang.c.moderated
Article #2605Multidimeensional Arrays vs. pointers
From: Eric Winter
Date: Wed, 17 Apr 1996 01:44
Date: Wed, 17 Apr 1996 01:44
43 lines
1739 bytes
1739 bytes
Is it possible to cast object into a multidimensional array? Malloc a multidim. array? What is the syntax? The problem where I see this arising is when I try to "reuse" code. Some people are religious about flexibility and use pointers, and arrays of pointers to implement multidimensional arrays, others coming from the FORTRAN world like clarity and define everything at compile time and publish dimensions in their #include's. Both have their advantanges. I have my preference but who cares. The problem is when the two collide its like matter and anti-matter. Wholescale copying is painful, especially when the data in data object is arranged just like a multidimensional array would be. I would also love to hear exactly how a multidim. array is actually stored i.e. there must be some overhead stating what the innermost dimensions are. How is that stored. Is it physically stored as a header to the data? Clueless in Chicago, --- Eric Winter Speech Processing Systems Lab Chicago Corporate Research Laboratories Motorola, Inc. 1301 East Algonquin Road Schaumburg, IL 60196 USA internal e-mail: winter-aew001@email internet e-mail: winter@mot.com phone: +1 (847)576-4173 fax: +1 (847)538-4713
Technical Details
Message-ID:
<4l1ieh$q0q@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4khlpr$t5g@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: winter@ukraine.corp.mot.com (Eric Winter) Newsgroups: comp.lang.c.moderated Subject: Multidimeensional Arrays vs. pointers Date: 16 Apr 1996 20:44:49 -0500 Organization: Motorola, Inc. Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4l1ieh$q0q@solutions.solon.com> References: <4khlpr$t5g@solutions.solon.com> Reply-To: winter@ukraine.corp.mot.com NNTP-Posting-Host: solutions.solon.com