if i have several arrays of the same datatype, what is the best way to copy them all into a 2d array. for example
int array1[] = {1,2,3,4,5,6,7,8,9,10};
int array2[] = {9,8,7,6,5,4,3,2,1,0};
int array2d[][];
//pseudo code array2d = array1 + array2
so that
array2d[0][0]; //=1 (first member of array1)
array2d[1][0]; //=9 (first member of array2)
considering an array is just a pointer to the first element, i thought I could do this, but it creates a compiler error.
array2d[0][0] = array1;
array2d[1][0] = array2;
I'm guessing I can't copy using references because an array needs its entries in contiguous memory? is there a memset like funciton I can use?