cpp defining enum code example
Example 1: 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 2: enum c++
enum names {blah1, Blah2 , blah3};
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
enum names {blah1, Blah2 , blah3};