T
Teddy
Hello all
consider the code fragment below:
case 1:
{
int i = 1;
break;
}
VC give this error:error C2360: initialization of 'i' is skipped by
'case' label
but if i write like this:
case 1:
{
int i;
i = 1;
break;
}
it is successfully compiled
why ?
consider the code fragment below:
case 1:
{
int i = 1;
break;
}
VC give this error:error C2360: initialization of 'i' is skipped by
'case' label
but if i write like this:
case 1:
{
int i;
i = 1;
break;
}
it is successfully compiled
why ?