Scoped Enumerations
In this lesson, we'll discuss how enumerations are used to define custom data-type containing integer constants.
We'll cover the following...
Enumerations allow us to define a custom data-types containing integer constants. These integer constants are called enumerators. Sadly, classical enums have a few drawbacks.
Drawbacks of enumerations in classical C++
Three of the biggest drawbacks of classical enumerations are listed below:
-
Enumerators implicitly convert to
int. ...