Mail Archives: djgpp/2002/02/18/06:53:48
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 -