例子:
int type = 2;
switch (type) {
case 1:
std::cout << 1 << std::endl;
break;
case 2://故意没写break
std::cout << 2 << std::endl;
case 3:
std::cout << 3 << std::endl;
break;
case 4:
std::cout << 4 << std::endl;
break;
default:
std::cout << 5 << std::endl;
}