I'm defining a variable as integer and want to use thati
int specLength = 17;
int spec[specLength-1];
When I do this, I get the following error message:
TestProgram:34: error: array bound is not an integer constant before ']' token
int spec[specLength-1];
But when I set it up as
int specLength = 17;
int spec[16];
it all works fine.
What is the magic here?
Many thanks