I have a 2d array of structs like this,
MapStruct myMap[50][50];
So we can initialize like this,
myMap[0][0].left = 0;
myMap[0][0].up = 1;
myMap[0][0].right = 5;
I know that I can also use the below example,
MapStruct myMap[50][50] = { {0,1,5}, {2,3,7}, {9,11,8} ... };
But the problem is that there are significant empty spots in this 50x50 structure. So for example maybe from [30][40] up to [40][50] is empty and some other points here and there are empty so with the above bracket notation i have to leave empty brackets like this {},{},{} for those empty spots.
Now my question is is there a way to initialize the like below?
myMap[0][0] = {0, 1, 5}; // gives a syntax error
Saves two lines per point I'd be pretty happy with that.
Ps: I'm using the indices myMap[x][y] as keys like a dictionary object so I can't just get rid of those empty ones in the middle because that changes the indices.