2f9 Subj : Re: Creating an array in a function To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Sat Jul 24 2004 07:30 pm user@domain.invalid wrote: > I have an application that creates an array in main() using a const >arraySize. I want to pass the array and arraySize to a function that >will create a two-subscripted array using the arraySize passed to the >function. Every method I've tried results in a message saying a constant >must be used in the array declaration. Sorry, can't do it. You have to do the math yourself. If you want an array[y][x] then you have to allocate an array[y*x] as in char *array = (char*) malloc( y * x * sizeof(char) ); And access the items instead of array[J][K], as array[ (J*x) + K ] . 0