1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
void test() { switch ( n ) { case 1: std::cout << "1"; break; case 2: { std::cout << "2"; } break; case 3: { std::cout << "3"; } break; } }