I get the following error when I use constant nVar instead of a number.
nVar
constants.h:
extern const unsigned int nVar; >
I think it happens because compiler should know array's size at compile time, but in your example value of nVar will be known only at linking time due to extern