Compiler Error 145

You are trying to initialize a variable that for some reason isn't allowed to be initialized.

One way for this error to occur is if you try to initialize an array with a non-constant length. In this case, you may need to construct a loop to initialize the array.

int mylength=10;
int myarray[mylength]={0}; //This will not work because mylength is not constant.   

Use this instead:

int mylength=10;
int myarray[mylength];    
for(int i=0;i<mylength;i++){ myarray[i]=0;}

All wikipages