alladir:
You have to use a dynamic array, and the ArrayResize() function.
At the moment I'm creating an array with 7 entries like this:
But I'd like to put the code in a .mqh file and then #include it in many files, with different sizes of the array.
I tried to do this:
but it doesn't compile:
"integer number expected".
Is it possible to do this somehow?
Excellent, thanks! :D
You cant initialize an array with a variable.
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
At the moment I'm creating an array with 7 entries like this:
But I'd like to put the code in a .mqh file and then #include it in many files, with different sizes of the array.
I tried to do this:
but it doesn't compile:
"integer number expected".
Is it possible to do this somehow?