Electrical and Computer Engineering
10 of 12
UAH
CPE 112
Enumeration Type Output
•Enumeration types are known only internally to the program, they are input and output indirectly.
•
•  switch (inPatient)
•  {
•     case RODENT :  cout << “Rodent”;
•                    break;
•     case CAT    :  cout << “Cat”;
•                    break;
•     case DOG    :  cout << “Dog”;
•                    break;
•     case BIRD   :  cout << “Bird”;
•                    break;
•                 .
•                 .
•                 .
•  }
•