HI all ,

What is the difference between enum and #define ?

I know as enum will give integer value and #define is a macro which help to replacement of string.

So my doubt is :--

enum bool { YES, NO}; mean value of YES == 0 and NO ==1

#define NO 1
#define YES 0


So from above two , what is the difference between enum and #define ?


Thanks in Advance,
-Amaresh