Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
By default, the underlying type of an enumeration is int. However, you can specify the type to be signed or unsigned forms of int, short, long, __int32, or __int64. You can also use char.
Example
Code
// mcppv2_enum_3.cpp
// compile with: /clr
public enum class day_char : char {sun, mon, tue, wed, thu, fri, sat};
int main() {
// fully qualified names, enumerator not injected into scope
day_char d = day_char::sun, e = day_char::mon;
System::Console::WriteLine(d);
char f = (char)d;
System::Console::WriteLine(f);
f = (char)e;
System::Console::WriteLine(f);
e = day_char::tue;
f = (char)e;
System::Console::WriteLine(f);
}
Output
sun
0
1
2