Enumeration variable declarations

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

Read syntax diagramSkip visual syntax diagramEnumeration variable declaration syntax
 
   .-----------------------------.
   V                             |
>>---+-------------------------+-+--enum--tag_identifier-------->
     +-storage_class_specifier-+
     '-type_qualifier----------'
 
>--declarator--------------------------------------------------><
 

The tag_identifier indicates the previously-defined data type of the enumeration.

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

Related information



[ Top of Page | Previous Page | Next Page | Contents | Index ]