You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I need to create a two dimensional array dynamically, that is to say I do not know in advance what size the array needs to be.
Therefore I would want to create an array like this (below) where iSizeA & iSizeB are intergers with the required sizes.
double dInputData[iSizeA][iSizeB];
However, it seems that MQL5 will not allow this and you must declare the array with a static size for the second element.
ArrayResize only works on the first element of an array.
So how can I have 2nd dimension that is variable in size? this seems to be a short coming as sometimes I will only need a few elements in the 2nd dimension and other times many thousands, if I set it to many thousands statically, it will not only use lots of memory needlessly most of the time but may still not be enough on occasions and cause the program to fail.
any ideas?