Arrays?

 

Iclaim to have read theBook [severalChapters severalTimes] & to havebeen reading theForum for some weeks [mostly, very informative/insightful Responses].

MyRequest is:

Iset anExternal, then use it to define anArray as Global = theCompiler doesn't like it. What am i not understanding?

...
extern int maxOpen = 10; // MaxNum of OpenPositions

...
int tktNum[maxOpen+1];

...
int init()

...

Thank you.

 

You can declare an array size with a constant only. To solve your problem use ArrayResize():

extern int maxOpen = 10; // MaxNum of OpenPositions
int tktNum[];

int init()
{
   ArrayResize(tktNum,maxOpen+1);
   //... 
 
gordon wrote >>

You can declare an array size with a constant only. To solve your problem use ArrayResize():


Thank you.