3b5 Subj : Re: using of delete for **arrays: double** C = new double* [azei]:??????????????????? To : borland.public.cpp.borlandcpp From : maeder@glue.ch (Thomas Maeder [TeamB]) Date : Tue Sep 16 2003 09:36 pm "Peter Jahn" writes: [Your immediate question has already been answered.] > Hi, I have written the following procedure for Multiplication of two arrays > A,B with an new array C, but Idon'nt knw how to delete C: > > double **produkt(double *A[],int azei,int asp, > double *B[],int bzei,int bsp) > > { > double** C = new double* [azei]; > for (int i = 0;i<=azei;i++) > { > C[i] = new double[bsp]; /////////////<<<<<------definition of the > array > } Please note that you are going to lose resources if these new expressions fail. I'd use objects rather than a "raw" pointers for expressing the ownership of all these dynamically allocated objects. . 0