Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
'enum': enumerator requires value since the underlying type is 'type'
Remarks
You can specify an underlying type for an enumeration. However, some types require you to assign values to each enumerator.
For more information on enums, see enum class.
Example
The following example generates C3062:
// C3062.cpp
// compile with: /clr
enum class MyEnum : bool { a }; // C3062
enum class MyEnum2 : bool { a = true}; // OK