Subj : using of delete for **arrays: double** C = new double* [azei]:??????????????????? To : borland.public.cpp.borlandcpp From : "Peter Jahn" Date : Tue Sep 16 2003 04:16 pm 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 } for (int j=1;j<=bsp;j++) { for(int i=1;i<=azei;i++) { C[i][j]=0.0; for (int k=1 ; k<=asp;k++) { C[i][j] +=A[i][k]*B[k][j]; } } } return C; //////////////<<<<<<<<<<<<<<-----return to main program } after calling this routine in the main program I have to delete array C before I can use the routine again. but how to do this??? That can't be right: main() { D=produkt(E,F,3,4,4,5) delete[ ] C ?????????? ////////////<<<<<--------deleting of the array ?????????? ..................... } -- Thanks for helping Peter Jahn .