using structures with multidimentional tables
Posted
by gem
on Stack Overflow
See other posts from Stack Overflow
or by gem
Published on 2010-06-05T09:29:04Z
Indexed on
2010/06/05
9:32 UTC
Read the original article
Hit count: 157
I have a table of structures and this structures are 2 dimentional table of constants.
can you teach me on how to get the values in the table of constants.
(note following is just example)
typedef struct
{
unsigned char ** Type1;
unsigned char ** Type2;
} Formula;
typedef struct
{
Formula tformula[size];
} table;
const table Values = {
(unsigned char**) &(default_val1),
(unsigned char**) &(default_val2)
};
const unsigned char default_val1[4][4] = {
{0,1,2,3},
{4,5,6,7},
{8,9,0,11},
{12,13,14,15}
}
const unsigned char default_val2[4][4] = {
{15,16,17,13},
{14,15,16,17},
{18,19,10,21},
{22,23,24,25}
}
© Stack Overflow or respective owner