Visual C++ Enumerations in Class Designer
Class Designer supports C++ enumeration types, which are declared with the enum keyword. Following is an example:
enum CardSuit {
Diamonds = 1,
Hearts = 2,
Clubs = 3,
Spades = 4
};
A C++ enumeration shape in a class diagram looks and works like a structure shape, except that the label reads Enum, it is pink instead of blue, and it has a colored border on the left and top margins. Both enumeration shapes and structure shapes have square corners.
For more information about using the enum type, see C++ Enumeration Declarations.
Code element |
Description |
---|---|
|
EnumName Enum (The enumeration list is comma-delimited, and the declarator is optional.) |
See Also
Concepts
Working with Visual C++ Code in Class Designer