memset set array to 0 double dimention code example
Example: initialize 2d array c++ memset
int arr[10][20] = {0}; // easier way
// this does the same
memset(arr, 0, sizeof arr);
int arr[10][20] = {0}; // easier way
// this does the same
memset(arr, 0, sizeof arr);