J
johny smith
I have never really understood the difference between
1.) #define NUMBER 1.653
vs.
2.) const double NUMBER = 1.653
I know that the #define is taken care of by the pre-processor and the
compiler is used in the second case but why would one be chosen over the
other.
One book I read suggested that your should prefer the compiler to the
preprocessor, but why does it really matter?
Thanks in advance.
1.) #define NUMBER 1.653
vs.
2.) const double NUMBER = 1.653
I know that the #define is taken care of by the pre-processor and the
compiler is used in the second case but why would one be chosen over the
other.
One book I read suggested that your should prefer the compiler to the
preprocessor, but why does it really matter?
Thanks in advance.