I haven\'t written any C++ in years and now I\'m trying to get back into it. I then ran across this and thought about giving up:
typedef enum TokenType
{
In C, it is good style because you can change the type to something besides an enum.
typedef enum e_TokenType
{
blah1 = 0x00000000,
blah2 = 0X01000000,
blah3 = 0X02000000
} TokenType;
foo(enum e_TokenType token); /* this can only be passed as an enum */
foo(TokenType token); /* TokenType can be defined to something else later
without changing this declaration */
In C++ you can define the enum so that it will compile as C++ or C.