E
Erik Wikström
How about this?
struct Dwarf {
enum Profession {
FIGHTER=1, HUNTER, ROGUE, MINER,
ARCHER, ROCKTHROWER, MAX_PROF};
};
struct Goblin {
enum Profession {
BARBARIAN=1, FIGHTER, HUNTER, ROGUE,
TINKER, MINER, SHAMAN, MAX_PROF};
};
Drop the all-caps and it is quite good, personally I would have liked
the enumerators to be scoped so you would have have to play with a
struct/namespace. Luckily this will be in the next standard.