all declared arrays into a list of arrays

 

Hi, at the start of my program I am declaring a bunch of arrays, and they all increment in size +1 per tick and they all maintain equal size to one another.

double array1[], array2[], array3[], ..... , array99999[]

void OnTick()
{
        ArrayResize(array1, x+1);
        ArrayResize(array2, x+1);
        ArrayResize(array3, x+1);
        ........
        ArrayResize(array99999, x+1);
}

as you can imagine this adds a lot of line to my code.

Instead of doing it this way, is, there a function to automatically gather all declared arrays into a list?

I'm hoping I can run a For loops over the length of this list of arrays executing the same function, something like so:

double arraylist[] = {array1[], array2[], array3[], .... , array99999[]};

for (int i = ArraySize(list), i>0, i--)
{
        ArrayResize(list[i], x+1);
}

I probably do not have a syntax correct in this so feel free to chime in on how this could be modified.

If this is possible, this would dramatically reduce the lines in my code.  

thank you

 
Hoi Cheng: I probably do not have a syntax correct in this so feel free to chime in on how this could be modified.
  1. It can't. MTx has no pointers to POD.
  2. Look in the library. There you can have an array of classes containing an array.
Reason: