array out of range for dynamic array
kwang1:
What's wrong with following code?
2014.02.11 20:02:06.102 bbb (EURUSD,M1) array out of range in 'bbb.mq5' (16,7)
You have to specify the size of your dynamic array. You can do this by using the ArrayResize() funtion.
double aaa[]; ArrayResize(aaa,2); aaa[0]=10; aaa[1]=20; Print("aaa[1] = "+DoubleToString(aaa[1]));
Malacarne:
thanks a lot.........
You have to specify the size of your dynamic array. You can do this by using the ArrayResize() funtion.
What's wrong with following code?
2014.02.11 20:02:06.102 bbb (EURUSD,M1) array out of range in 'bbb.mq5' (16,7)