Why do I get a warning when I declare the same variable name inside different cases of a switch-case.
switch()
{
   case 1:
     int a;
   break;
   case 2:
     int a;
   break;
}
Is there a way to do this without getting a warning. (Without putting it before the switch - case)
 
     
     
    