You can't define a variable inside a switch statement. Define that int outside first and then assign it a value inside the switch.
You can't define a variable inside a switch statement. Define that int outside first and then assign it a value inside the switch.