A simple question about accessing array information through pointers that I can't seem to figure out. I'm passing a bunch of multi-dimentional arrays into a function. Now they are not dynamic but even if static, I have to pass them as pointers right? (If I'm wrong, please do correct me)
So once I do pass them into a function, how do I access it..?
int main()
{
int anArray[5][5] = // member intializations
foo(*anArray);
}
void foo(int * anArray) //or should that be int ** anArray ??
{
cout << anArray[2][2] << endl; // how should i address this..?
}
If someone could explain that would be greatly appreciated..
Dean