I have an int called setupStage. This is simply a value I increment at the completion of each stage, so I can say, if (setupStage == 2), and I know that I am at the third stage (it defaults to 0).
Is there a way I can refer to these numbers in a better way? For example:
if (setupStage == stageEnterName)
Instead of having to refer to its actual raw int value.
It may be a misconception, but does what I am trying to achieve have anything to do with defining macros?
Yes!
Try this:
This is the same thing as this:
The values default to 0 at the first slot and then increment by 1 automatically. Note that the token names (MyTypeX) are arbitrary string values you set.
In this case they go from 0 to 3. Then you can say something like this:
Which is identical to