C - Map a 2D array onto a 1D array Code Example

The code for Map a 2D array onto a 1D array

int arr[width * height];

int Map2DArrayOnTo1DArray(int row, int col, int element)
{
	arr[width * row + col] = element;  
}
Code by IncludeHelp, on August 23, 2022 10:00

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.