Skip to content

Instantly share code, notes, and snippets.

@DanSearle
Created October 3, 2013 16:09
Show Gist options
  • Save DanSearle/6812394 to your computer and use it in GitHub Desktop.
Save DanSearle/6812394 to your computer and use it in GitHub Desktop.
C++ convert an integer to an enum
int i = 0;
EnumType t = static_cast<EnumType>(i);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment