Answers for "2d array to 1-d arrray"

C++
2

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

Code answers related to "2d array to 1-d arrray"

Browse Popular Code Answers by Language