robtillaart,
I think the #define or 'const' are both good ways to implement constant values. The important thing is that they document the meaning of the constant. Your example does that.
This example does not:#define SIXTEEN 16
Also, in the code:foo(i,j,16);
the 16 is a "magic number" because you have to be a wizard to understand its meaning. If one does it as you do, and writes
foo(i,j,NUMBER_OF_LEDS);
then even muggles can understand it.
(I know you understand all this, robtillaart, but some readers may not.)
Regards,
-Mike