multi-dimentional arrays are ugly. I avoid them for this very reason.
computerquip's example works for a dynamically allocated 2D array (ie: a pointer to a pointer), but does not work with "normal" 2D arrays. To pass a multidimensional array, you need to know the size of every dimension except the first one:
1 2 3 4 5 6 7 8 9 10 11 12 13
void openMode(char blah[][100]) // need the [100] here
{
}
int main()
{
char david[10000][100]; // sidenote: probably a bad
// idea to put this much on the stack
openMode( david );
return 0;
}
hey men, take it easy=]
thanks Disch, by using your method, I can successfully change the given 'david' pointer in function openMode.
thanks all of you.