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

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: arrays in an array
Lines: 40
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: <PyUb8.5637$I01.244480@news20.bellglobal.com>
Date: Sun, 17 Feb 2002 15:39:35 -0500
NNTP-Posting-Host: 64.229.115.63
X-Complaints-To: abuse AT sympatico DOT ca
X-Trace: news20.bellglobal.com 1013978415 64.229.115.63 (Sun, 17 Feb 2002 15:40:15 EST)
NNTP-Posting-Date: Sun, 17 Feb 2002 15:40:15 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

hey there im having a little bit of a coding problem.. ive got the algorithm
down but cant figure out the coding part.

heres what i wanna do.. i would like to access an array element whos array
is an element itself.. for example

lets say we have an array a1, whos elements are arrays

_______________________
|___|____|___|___|____|___|
and inside these elements there are more arrays
|___||___||___||___||___||___|
|___||___||___||___||___||___|
|___||___||___||___||___||___|
|___||___||___||___||___||___|

my question is this..
how would i be able to access.. say the 3rd element in the 2nd element of
the array?
eg.
_______________________
|___|__o_|___|___|____|___|
           V
|___||___||___||___||___||___|
|___||___||___||___||___||___|
|___||_o_||___||___||___||___|
|___||___||___||___||___||___|

would i do something like this??
a1[1].[3] or soemthing like that??

plus, i dont want to set it up as a multidimensional array. because im
trying to simulate grocery store checkout stations.

Please, I would appretiate any help!!

Thanks,
Paul M.


- Raw text -


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