Enumerated types
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hi all! I have to do an enumerated type but I don't know how is it. If my variable is "color" and it may have the value red, green, yellow, blue or pink, how would it be written? Thank you in advance :)
enum enCOLOR
{
enRED,
enGREEN,
enBLUE,
enPINK,
}main()
{
enum enCOLOR mycolor;
mycolor = enGREEN;
....
switch(mycolor)
{
case enRED:
....
case enGREEN:
...
}
}