I completely agree with the suggestions on using constants and the unlimited scope for #define s.
However, if you do have to use #define preprocessor strings, please attach them correctly for the expected scope,
namespace MyNamespace { #define SOME_VALUE 0xDEADBABE
Why #defines ?
I know one case where the embedded platform did not support constants in the code.
There was no way to initialize them ...
It always helps to be more readable.
nik Jul 06 '09 at 17:48 2009-07-06 17:48
source share