Chapter

Enumerated Types

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. Why are enumerated types better than arbitrary integer error codes?

    "The usage of the integers 1, 2, 3 to indicate the various errors was arbitrary. These are essentially magic numbers that the calling function would have to deal with by making comparisons with variou

  2. How do you declare an enumerated type in C?

    "C allows you to define enumerated types which allow you to define a fixed list of possible values. For example, the days of the week or months of the year are possible values used in a date. However,

Enumerated Types | ComputerScienceOne | Bifalgorithm | Bifalgorithm