Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

one dimensiol array to two dimen c++

int arrayOne[100]; /// One dimensional
int arrayTwo[10][10];

for(int i = 0;i<10;i++){
 for(int j = 0;j<10;j++){
   arrayTwo[i][j] = arrayOne[(i * 10) + j];
   //replace 10 width the width of the array when its multidimensional
 }
}

//pee pee poo poo :))))(((
 
PREVIOUS NEXT
Tagged: #dimensiol #array #dimen
ADD COMMENT
Topic
Name
3+8 =