Hi!
Any way to write a function in C++ so i could replace the below:
for (int i = 0; i < MAX_BLOCK; i++)
for (int ii = 0; ii < MAX_BLOCK; ii++)
for (int iii = 0; iii < BUILDING_X; iii++)
for (int iiii = 0; iiii < BUILDING_Y; iiii++){
block[i][ii].building[iii][iiii].doSomething();
}
with something like this (i access every building but can change what to do with them in the “body” like i do below).
doEveryBuilding(){
b.doSomething();
}