I am working on Arduino and trying to change the elements of an array. Before setup, I initialized the array like this:
bool updateArea[5] = { false };
And then I wanted to change the array like this:
updateArea[0] => false,
updateArea[1] => true,
updateArea[2] => false,
updateArea[3] => false,
updateArea[4] => true
by using:
memcpy(&updateArea[0], (bool []) {false, true, false, false, true}, 5);
However, I get the "taking address of temporary array" error.
I also tried to initialize the array in setup and loop functions but get the same error.