Let's say I have a 9-dimensional array:
int arr[4][4][4][4][4][4][4][4][4];
I want to initialize every element to be 1.
I know I can initialize it using multiple loops:
for(int i1 = 0; i1 < 4; i ++) {
...// eight more similiar loops
}
But it seems ugly.
What is the best practice to do that? Maybe I can use macro?