Is there any way of testing for a range of values in a switch statement?
such as:Obviously, that doesn't work. I've looked around and I can't find an example of this in any tutorial.Code:int main() { int x = 5; switch(x) { case 4, 5, 6 : break; default : return 1; } return 0; }



LinkBack URL
About LinkBacks



