- ArraySize "returns the number of elements of a selected array" which means for a 2x3 array you get 6, not the number of either dimension. ArrayRange - Array Functions - MQL4 Reference
- clusters[i] is illegal as clusters is a two dimensional array, not an array of arrays.
WHRoeder:
- ArraySize "returns the number of elements of a selected array" which means for a 2x3 array you get 6, not the number of either dimension. ArrayRange - Array Functions - MQL4 Reference
- clusters[i] is illegal as clusters is a two dimensional array, not an array of arrays.
Ok, Thanks for your answer!
I can't test it at the moment but would this work?
void ComputePPRZ(CProjection* &clusters[][], CProjection* &prz[]) { for (int i=0; i<ArrayDimension(clusters); i++) { ... for (int j=0; ArrayRange(clusters, i); j++) { ... } } }
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
Hello,
I'm trying to loop over a 2 dimentional array but I get "invalid array access" when trying to access the second array?
Am I doing it wrong?
This is my code. The highlighted code gives the error.
Any idea?
Thanks!