c++ enum or enum class code example
Example 1: enum c++
enum Colors
{
BLACK,
GREEN,
BLUE,
RED
};
Example 2: enum c++
enum Foo { a, b, c = 10, d, e = 1, f, g = f + c };
//a = 0, b = 1, c = 10, d = 11, e = 1, f = 2, g = 12