Enumeration
– Set of integers represented by identifiers
–Enumeration constants – like symbolic constants whose values automatically set
•Values start at 0 and are incremented by 1
•Values can be set explicitly with =
•Need unique constant names
–Declare variables as normal
•Enumeration variables can only assume their enumeration constant values (not the integer representations)
No comments:
Post a Comment