Answers for "how to turn a 1D array in to a 2D array"

1

array 2d to 1d

int array[width * height];

 int SetElement(int row, int col, int value)
 {
    array[width * row + col] = value;  
 }
Posted by: Guest on January-28-2020

Python Answers by Framework

Browse Popular Code Answers by Language