int i,j,array[];
Array has no size and you don't resize it.
Isn't it possible to use a dynamic array in cases like this?
Isn't it possible to use a dynamic array in cases like this?
Yes, but when assigning a variable to the array index position, you have to make sure that the index position exists
Yes, but when assigning a variable to the array index position, you have to make sure that the index position exists
thank you for your response, So I understood from the answers that the best way for assigning the array's index is to make an array in size of 1 ( for example a[1]) and when I want to add any other index then I resize it (ArrayResize(a,2) ) and add a new array to it also add my variable to the newly added index for example. ( a[1]=1 ).
Am I correct?
thank you for your response, So I understood from the answers that the best way for assigning the array's index is to make an array in size of 1 ( for example a[1]) and when I want to add any other index then I resize it (ArrayResize(a,2) ) and add a new array to it also add my variable to the newly added index for example. ( a[1]=1 ).
Am I correct?
I'm no expert on arrays and I don't understand everything.
But for a dynamic array, declare it as a[] and then resize it to 1
string arrayid[]={"arraynum0","arraynum1","arraynum2"}; int arrayidcnt=ArraySize(arrayid);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi my friends,
I don't know how to deal with this problem.
I've written a code by use of Arrays but I don't know why it doesn't work or compile on the graphs. and the most incredible thing is that I was using some other codes look like this but now it doesn't work !!
it print in journal " array out of range in test.mql4 " .
Here is my test code :