I have to implement the following in a switch
statement:
switch(num)
{
case 4:
// some code ;
break;
case 3:
// some code ;
brea
You cannot use comparisons in switches like you could in VB, you have 2 options here, replace the value you switch on with a known value and use that or - if you mean all other cases - you can use the default clause:
switch(num)
{
case 4:
// some code ;
break;
case 3:
// some code ;
break;
case 0:
// some code ;
break;
default:
// some code ;
break;
}
Note that this does not exactly like you asked for: any values other than 0,3,4 will end up in the deafult: clause.