S
Scott
Hi All,
I have the following C code in a header file, outside of any functions:
const float X = 50;
const float Y = 100 * X;
But, when compiling, I get an error:
initializer element is not constant
Why is this? What is the best way to fix the problem (which is that I
want to define a number of constants, and that each constant depends on a
specific constant themselves, and these constants should be in their own
header file)?
Thanks for any help.
Best,
Scott
I have the following C code in a header file, outside of any functions:
const float X = 50;
const float Y = 100 * X;
But, when compiling, I get an error:
initializer element is not constant
Why is this? What is the best way to fix the problem (which is that I
want to define a number of constants, and that each constant depends on a
specific constant themselves, and these constants should be in their own
header file)?
Thanks for any help.
Best,
Scott