What\'s the difference between using a define statement and an enum statement in C/C++ (and is there any difference when using them with either C or C++)?
For exampl
It's always better to use an enum if possible. Using an enum gives the compiler more information about your source code, a preprocessor define is never seen by the compiler and thus carries less information.
For implementing e.g. a bunch of modes, using an enum makes it possible for the compiler to catch missing case-statements in a switch, for instance.