Hi all
I've a method which i call x-times. I fill an array in this method and I don't know how many times the method will be called during the runtime (every call of the method creates a new entry in the array. It could be upto 300 times before I "free" the array).
Short: I don't know the needed size of the array before runtime.
I used the function ArrayResize which works quite well if I have an int arr[] (or another simple datatype). Now, I have a "structure-array" and it doen't works with that function. There is no error but also no sucessfull resizing. I've simplified my code to test that (in "OnTimer" only for testing).
ArrayResize function has no effect. Can anybody help me?
Thanks
Why don't you click that (ArrayResize function). it says " Note The function can be applied only to dynamic arrays. ... ", and you have static one.
And beside, if you "... don't know the needed size of the array before runtime.", don't you think it's better to use dynamic arrays, no ?

- 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 all
I've a method which i call x-times. I fill an array in this method and I don't know how many times the method will be called during the runtime (every call of the method creates a new entry in the array. It could be upto 300 times before I "free" the array).
Short: I don't know the needed size of the array before runtime.
I used the function ArrayResize which works quite well if I have an int arr[] (or another simple datatype). Now, I have a "structure-array" and it doen't works with that function. There is no error but also no sucessfull resizing. I've simplified my code to test that (in "OnTimer" only for testing).
ArrayResize function has no effect. Can anybody help me?
Thanks