Electrical and Computer Engineering
8
of 12
UAH
CPE 112
Typical Usage of an
Enumeration Type
•
switch
(inPatient)
•
{
•
case
RODENT
:
•
case
CAT
:
•
case
DOG
:
•
case
BIRD
: cout << “Cage ward”;
•
break
;
•
case
REPTILE
: cout << “Terrarium ward”;
•
break
;
•
case
HORSE
:
•
case
BOVINE
:
•
case
SHEEP
: cout “Barn”;
•
break
;
•
}