Possible Duplicate:
C++ - enum vs. const vs. #define
In the Linux kernel, one can see this:
enum {
CONST_X = 1,
CONST_Y = 2,
};
Is that a better practice than #define CONST_X 1
?
Possible Duplicate:
C++ - enum vs. const vs. #define
In the Linux kernel, one can see this:
enum {
CONST_X = 1,
CONST_Y = 2,
};
Is that a better practice than #define CONST_X 1
?