www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/17/16:45:04

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "PM" <sendto DOT paulm AT sympatico DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: re array of arrays
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <hnVb8.41607$JZ.3853549@news20.bellglobal.com>
Date: Sun, 17 Feb 2002 16:35:07 -0500
NNTP-Posting-Host: 64.229.115.63
X-Complaints-To: abuse AT sympatico DOT ca
X-Trace: news20.bellglobal.com 1013981773 64.229.115.63 (Sun, 17 Feb 2002 16:36:13 EST)
NNTP-Posting-Date: Sun, 17 Feb 2002 16:36:13 EST
Organization: Bell Sympatico
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

sorry, I'll clarify the previous post

I have an array. Lets call this arr. The array has, lets say, 5 elements
so.. it looks like this
__________________________________________
|________|________|________|________|________|

now... inside EACH of these array elements, I would like to have more
arrays, lets say 4 elements in size.. so it would look like this

__________________________________________
|________|________|________|________|________|
     ___           ___           ___            ___           ___
    |___|          |___|         |___|           |___|         |___|
    |___|          |___|         |___|           |___|         |___|
    |___|          |___|         |___|           |___|         |___|
    |___|          |___|         |___|           |___|         |___|

So now, I would like to access, say, the 3rd element in the array, that is
inside of the 2nd array (arr). eg.

 __________________________________________
|________|___2____|________|________|________|
     ___           ___           ___            ___           ___
    |___|          |___|         |___|           |___|         |___|
    |___|          |___|         |___|           |___|         |___|
    |___|          |_3_|         |___|           |___|         |___|
    |___|          |___|         |___|           |___|         |___|


Now, I would not like to code this, mutlidimensionally. eg arr[5][4]..
because the rest of my coding wouldn't be compatible..

My question is this.

How would I be able to access this element?

I know this doesnt work but it would seem something like this..

arr[2].the2ndarray[3];

but not sure !! :(

Hope this clarifies

Thanks very much for your help,

Paul M.


- Raw text -


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