12345678910111213141516171819202122232425
#include<iostream> using namespace std; int main() { int num =3; switch(num) { case 0: int v = 4; // this will give an error // ... break; case 1: { int q = 5; //inside a block is OK // .... } break; default: //... break; } }