Download MetaTrader 5
To add comments, please log in or register
Use MQL5 Cloud Network. Test robots at a super speed!
dmipec
154
dmipec 2015.09.29 09:29 

Hi 

The new build of the Termianl does not allow an array declared in the function as static

Example:

static int a[];
ArrayResize(a,1);

 

 The Compiler does not complain about it. But the Terminal does (4.00 build 890, 32-bit) 

Access violation write to 0x00000008

 

I used to have these type of arrays before which would keep its contents every time I call the function. The intend was to avoid declaring an array on a global scope.

Any ideas how to implement this idea?


Marco vd Heijden
Moderator
4073
Marco vd Heijden 2015.09.29 09:33  

declare array on global scope.

int a[];

you can resize anytime, but declare array on global scope.

Vladimir Karputov
Moderator
33527
Vladimir Karputov 2015.09.29 11:59  

Forum on trading, automated trading systems and testing trading strategies

static array error

Ilyas, 2015.09.29 11:13

Thank you for your message error reproduced. Fix.

/
To add comments, please log in or register