Chapter
Using Enumerated Types for Error Codes
From ComputerScienceOne by Dr Chris Bourke
Concepts
- How do enumerated types represent named values in C?
"19. Error Handling values it can take are SUNDAY, MONDAY, etc. and we can use these keywords in our program. For example,\n\nDayOfWeek today = MONDAY;\n\nif(today == SUNDAY || today == SATURDAY) {\n\
- How can enumerated types be used for error codes in C?
"19.4. Using Enumerated Types for Error Codes\n\nLet’s apply enumerated types to our quadraticRoots() function example from before. First, we define our enumerated type which includes all types of err