Enumeration variable declarations

You must declare the enumeration data type before you can define a variable having that type.

Enumeration variable declaration syntax

Read syntax diagramSkip visual syntax diagram storage_class_specifiertype_qualifier enum tag_identifier declarator
The tag_identifier indicates the previously-defined data type of the enumeration.

C++ The keyword enum is optional in enumeration variable declarations.