Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

enum and define

Name: Anonymous 2010-09-25 12:15

So tell me, /prog/rammers

In C, why use enum instead of just #define?

Name: Anonymous 2010-09-25 12:29

OP here: So enum is essentially just one-step defines, then?

Is there a way to get it to go in bigger steps, e.g.

#define a 0
#define b 1
#define c 2
#define d 4
#define e 8

etc.?

Or even size steps, like

#define a 0
#define b 2
#define c 4
#define d 6
#define e 8

?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List