• Advertisement
Sign in to follow this  

enum numbers

This topic is 4715 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

To my knowledge each enum gets a number 1, 2, 3, etc. Is it possible to get an enums corresponding number instead of what you named it?

Share this post


Link to post
Share on other sites
Advertisement
most certainly.


enum ENUM
{
V1,
V2,
};

int i = (int)V1;


Just cast to an int.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement