posted 14 years ago
Hi,
I have a very stupid doubt in using enums in switch. I am really confused though.
This is a sample of code from K&B chapter 5
The output in this case is green. I read somewhere specification says that, if you have to use enum's as case
constant, you must specify them without fully qualified name. I am puzzled how compiler is interpreting red and
green and blue in this case as a case label.
Hope someone can clarify this confusion.
Thanks,