C
Cuthbert
Hi guys,
I am trying to use a single array to access multiple 2D arrays but
I kept getting the error message. Could someone help me on this? Thank
you very much.
Here is my code:
// Definition
u16 const_1[4][2] ={
{25,65},
{23,65},
{2,777},
{2,13}
};
u16 const_2[4][2] ={
{15,65},
{13,65},
{1,5},
{1,13}
};
u16 *access_ary[2] = {
const_1,
const_2};
...............
// access them
k = access_ary[0][2][1]; // expecting k=777
I am trying to use a single array to access multiple 2D arrays but
I kept getting the error message. Could someone help me on this? Thank
you very much.
Here is my code:
// Definition
u16 const_1[4][2] ={
{25,65},
{23,65},
{2,777},
{2,13}
};
u16 const_2[4][2] ={
{15,65},
{13,65},
{1,5},
{1,13}
};
u16 *access_ary[2] = {
const_1,
const_2};
...............
// access them
k = access_ary[0][2][1]; // expecting k=777