const unsigned ncols = 100; // ncols = number of columns in the array class Fred { /*...*/ }; void manipulateArray(unsigned nrows) // nrows = number of rows in the array { Fred (*matrix)[ncols] = new Fred[nrows][ncols]; ... delete[] matrix; }