G
gaoqiang
recently, I came into some code like this:
#define ABCD_A 0x01
#define ABCD_B 0x02
#define ABCD_C 0x04
but someelse, there's code like that:
enum{
EFGH_E=0x01,
EFGH_F=0x02,
EFGH_G=0x04,
};
then,when will I use macro, and when enum ??
#define ABCD_A 0x01
#define ABCD_B 0x02
#define ABCD_C 0x04
but someelse, there's code like that:
enum{
EFGH_E=0x01,
EFGH_F=0x02,
EFGH_G=0x04,
};
then,when will I use macro, and when enum ??