Why is enum class considered safer to use than plain enum?
C++ has two kinds of enum: enum classes Plain enums Here are a couple of examples on how to declare them: enum class Color { red, green, blue }; // enum class enum Animal { dog, cat, bird, human }; // plain enum What is the difference between the two? enum classes – enumerator names … Read more