Re: 16x16Matrix
- From: "Vladimir S. Oka" <novine@xxxxxxxxxxxxxxx>
- Date: 26 Jan 2006 05:13:43 -0800
GrErlenkamp@xxxxxxx wrote:
> Hello there,
>
> i got a list of 16 "two-character" (AU,AG,UC...) elements, and now i
> want to create a 16x16-Matrix with the elements of this list for the
> columns and rows.
> So i need to know: How can i create such a list, how can i access each
> element and use this to create the matrix?
> Thank you for your help
>
> German
The way I understand your problem is that you want a 16x16 matrix where
rows and columns are addressed by AU, AG, ... thingies, and there's 16
of them. You did not specify what is to be held in the matrix, I'll
assume int, but you can pick any other type (including the ones you
define yourself).
enum my_enum (AU = 0, AG, UC /* you fill in the rest */);
int my_matrix[16][16];
It is now possible to address the elements like this:
int x = my_matrix[AU][UC];
Hope this helps. If not, then other replies in the thread might.
Cheers
Vladimir
.
- References:
- 16x16Matrix
- From: GrErlenkamp@xxxxxxx
- 16x16Matrix
- Prev by Date: Re: code for two half diamond shapes
- Next by Date: Help with FMOD
- Previous by thread: Re: 16x16Matrix
- Next by thread: Re: 16x16Matrix
- Index(es):
Relevant Pages
|