Bug : error #2069: Initializer must be constant

Started by Mikehg, January 14, 2006, 06:51:23 PM

Previous topic - Next topic

Mikehg

Hi Pelle,

I believe this should not be causing an error:

In global scope:

char   a[2048];
char  *b=&a[4];
char  *c=b;   <--- This line

test.c(129): error #2069: Initializer must be constant.

Thanks,
Mike Henning

Pelle

Hello,

You are assigning variable b to c - this is not allowed in global scope.

Pelle
/Pelle

Mikehg

Thanks Pelle,

It must only be valid in C++. I sometimes forget they are two different languages  #-o

Mike Henning