enums cpp 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
Example 3: enum c++
enum names {blah1, Blah2 , blah3};