how to convert 2d array into 1d array in c++ code example
Example: array 2d to 1d
int array[width * height];
int SetElement(int row, int col, int value)
{
array[width * row + col] = value;
}
int array[width * height];
int SetElement(int row, int col, int value)
{
array[width * row + col] = value;
}