Enumeration constants - examples

Nasza ocena:

3
Wyświetleń: 581
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Enumeration constants - examples - strona 1

Fragment notatki:

Enumeration constants • An enumeration is a list of constant integer values, as in enum boolean { NO, YES }; • The first name in an enum has value 0, the next 1, and so on, unless explicit values are specified. • If not all values are specified, unspecified values continue the progression from the last specified value, as the second of these examples: enum months {JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC }; /* FEB = 2, MAR = 3, etc. */ • Names in different enumerations must be distinct. Values need not be distinct in the same enumeration. ... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz