. . "You are getting an error because case 0: is a label, and in C it is illegal to have a declaration as the first statement after a label ??? note that the compiler expects an expression, such as a method call, normal assignment, etc. (Bizarre though it may be, he is the rule.)" . .