2011-09-27

There is an interesting discussed after today study group.

Is C/C++ support switch-case with range of integer!?

Let see a example :

//===================
switch (a)
{
case 1 ... 10:
//do somthing
break;

case 11 ... 20:
//do somthing
break;
default:
//do something
break;
}
//===================

This is successfully with gcc compiler.
But not done with VC++

That's because

Show more