dimanche 31 juillet 2016

Assign The first element in 3D array to 2x2 matrix

I have an array wich is 3D ( int [][][] A) and i would like assign ( initialize the first value of the A array to (int [][] B) which 2D array 2x2 matrix.

I used the code bellow :

    int ces =2;
    double [100][2][20]smp ; 
    double KMC [2][2];
      for(int ii = 0; ii <ces ; ii++){
         smp[0][ii]=  KMC[ii]; 
        }

The code is duplicating KMC.

Aucun commentaire:

Enregistrer un commentaire