I'm new in objective-c (or programming in general)
so, I was trying out switch statement, say:
option is an int type.
the default catches other int besides 123, but it doesnt catch other character (non int)
is there a way to add on the default so that it catches something other than non interger?
so, I was trying out switch statement, say:
Code:
switch (option){
case 1:
statement
break;
case 2:
statement
break;
case 3:
statement
break;
default:
statement
break;
the default catches other int besides 123, but it doesnt catch other character (non int)
is there a way to add on the default so that it catches something other than non interger?