I have a two dimensional array initialized as such
uint8_t array2dimension [x][y];
and would like to store a row into a 1 dimension array/
//store a random row into array1dimennsion
int range = x - 0 + 1;
uint8_t index = rand() % range + 0;
uint8_t array1dimension[y] = array2dimension[index];
But the code above throws an error
> array must be initialized with a brace-enclosed initializer
Why? Will your code modify the new 1-D array while the original 2-D array MUST remain unchanged? If not just access the row you need in the original array.