you're asking for two different things. pointers to arrays are, as arrays are in c nothing else but pointers to the first array element, pointers to pointers, e.g. var**. to pass an array, you don't need a pointer to the array but you can pass the array as-is, since it is already a pointer to the first array element, e.g. var*.
var array[200]; // now array is a pointer to the first element of 200 allocated vars on the stack
var* array2 = array; // array2 can be accessed just like array
var test = array[5];
test = array2[5];
var** p_array = &array; // now you're pointing to a pointer to the first element
test = (*p_array)[5]; // you have to dereference it first, the following is also valid, but no good style and i'm not sure lite-c compiles it
test = p_array[0][5]; // #1 see below
...
void f(var* arr)
{
var t = arr[5]; // keep care of your array bounds
}
void g(var** arr)
{
var t = (*arr)[5]; // same as above, hope you get the idea
}
...
f(array);
f(array2);
f(*p_array);
g(&array);
g(&array2);
g(p_array);multidimensional arrays lift the pointer level up accordingly, as twodimensional arrays are nothing else than pointers to pointers (see here #1).
joey.
btw. there are actually some differences. compilers usually allocate and deallocate pointers and arrays differently. so let's call them compatible here since we can use them both the same way.