#Initializing a 3d array efficiently.
9 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.
the whole array is contiguous
char arr[6][3][3];
for (size_t i = 0; i < 6; ++i) {
char value = 'a';
memset(arr + i, value, 3 * 3);
}
``` yeah you can memset them
Thank you and let us know if you have any more questions!
[SOLVED] Initializing a 3d array efficiently.
Initializing a 3d array efficiently.