Enum-type elements take on the following values by default:
enum Num {zero = 0, one = 1, two = 2, three = 3, four = 4}.
However, if one of the elements is explicitly assigned an integer value, then the values of all the elements following after it will change as well:
enum Num {zero = 0, one = 1, two = 37, three = 38, four = 39} (see section 7.2 on page 112 in "International standard ISO / IEC 14882").
Войдите чтобы поставить Нравится
Войдите чтобы прокомментировать