delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/18/06:53:48

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-ID: <20020218115254.6883.qmail@web20807.mail.yahoo.com>
Date: Mon, 18 Feb 2002 12:52:54 +0100 (CET)
From: =?iso-8859-1?q?cesar=20tejeda?= <cesar_tejeda_her AT yahoo DOT es>
Subject: Re: re array of arrays
To: djgpp AT delorie DOT com
In-Reply-To: <hnVb8.41607$JZ.3853549@news20.bellglobal.com>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Maybe you want something like this:
typedef struct {
     int arr[4];
} array4;

array4 a[5];

/* and then you access 2nd 3rd element like this:*/
a[1].arr[2];

¿is that?

 --- PM <sendto DOT paulm AT sympatico DOT ca> escribió: > 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.
> 
>  

_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger
Comunicación instantánea gratis con tu gente.
http://messenger.yahoo.es

- Raw text -


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