Newbie question here. It's been a while since I've done C programming,
and I hit a wall last night.
Let's say I have a three dimensional array, like so:
Code:
int p[2][3][3] =
{{{0,0,0},
{1,1,1},
{0,1,0}},
{{0,1,0},
{1,1,0},
{0,1,0}}};
I also have a number of other three dimensional arrays, generated with
a code generating script. The size of each dimension varies with each
one. Some are [5][3][3], some are [2][5][5], etc...
How would I declare a variable that could hold any of these
3-dimensional arrays? I'm tripping over the pointer syntax.
I'd like to be able to do something like:
int ***val = p; //The variable p from the last example.
I'm pretty sure that ***val is the wrong way to go about it.
Thanks for your help!