what about vectors? are they allowed in mql4? I couldn't get those to compile either.
bluepharo:
Hi everyone,
I was wondering why this array initialization won't compile.
the error is : invalid index value
I would like to set 10 to a input variable but I can't even get it to work like this.
any help would be much appreciated thanks
1) To set the size of a dynamic array with a variable(!) you have to use ArraySize(orderTicketArr,ORDERS)!
2) If you want to set the array size at definition you can use either an integer number like 10:
int orderTicketArr[10];
or by #define:
#define ORDERS 10 ... int orderTicketArr[ORDERS];
Ok thanks, I'll give that a try.
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
Hi everyone,
I was wondering why this array initialization won't compile.
the error is : invalid index value
I would like to set 10 to a input variable but I can't even get it to work like this.
any help would be much appreciated thanks