Why is this two-dimensional array expression wrong?

To add comments, please log in or register
Ernest Klokow
1207
Ernest Klokow  

I have an error in an EA that gives the following error message "invalid index value" to this declaration:

int aIndex[2][];

Why?

honest_knave
Moderator
2308
honest_knave  

Forum on trading, automated trading systems and testing trading strategies

A multidimensional array can be static or dynamic only in the first dimension, with all further dimensions being static. Thus, the ArrayResize() function allows you to only change the size of the first dimension. Sizes of other dimensions must be specified when declaring an array:


Ernest Klokow
1207
Ernest Klokow  
honest_knave:


Thank you very much!
To add comments, please log in or register