E
Emmanuel Delahaye
Antoine Junod a écrit :
or better
enum my_index
{
I_WHILE,
I_IF,
I_FOR,
I_NB
};
What could be smarter ?
I would like to index an "array" (semantic, not logic) with litterals in
a smart way. I could do as follow:
#define WHILE 0
#define IF 1
#define FOR 2
...
or better
enum my_index
{
I_WHILE,
I_IF,
I_FOR,
I_NB
};
and then use WHILE IF FOR to index my array. But that is not really
smart.
What could be smarter ?