dahumeovn:
Why can't I declare like above ?
Why can't I declare like above ?
You cannot, instead use ArrayResize()
int array[]; ArrayResize(array, OrdersTotal() );
dahumeovn:
Why can't I declare like above ?
Why can't I declare like above ?
I believe an array's elements must be literally declared at compile time, rather than simply at runtime.
The following generates a compile error...
int x = 1; int array[x];
however, the following does not:
int x = 1; int array[]; ArrayResize(array, x);
So, as RaptorUK suggested:
int array[]; ArrayResize(array, OrdersTotal());
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