Should enums be string or int?

Therefore, go for the meaning : the Strings are more meaningful than numbers, so use the String . Show activity on this post. Both have advantages. If you store them by their Integer value, then you must be careful editing your enumeration later on in your project.

Read more

Are enums just integers?

The C standard grants the freedom to use different integer types to represent different enumeration types, but most compilers just use int to represent all enumeration types . Treating enumerations as just integers leads to some useful behaviors.

Read more