> On Freitag, 9. April 2004 14:26, Jon Berndt wrote: > > Is there a better way to allocate storage for an array than this: > > > > > > double** Allocate(void) > > { > > Data = new double*[nRows+1]; > > for (int r=0; r<=nRows; r++) { > > Data[r] = new double[nCols+1]; > > for (int c=0; c<=nCols; c++) { > > Data[r][c] = 0.0; > > } > > } > > return Data; > > } > > Depends on what you need. > If you really need an array of an array there is nothing I know of. > If you need a 2-dimensional/n-dimensional array for the upcomming > multidimensional lookup tables, you told about, I would suggest > to allocate > the space in one block and implement access functions just like > we did for > the Matrix class.
I am afraid it is much simpler than that: all I need is a 2 dimensional array, n X m. Jon _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel