I'm wondering if we can declare something like below. My requirement was to use same variable but different structures. Can you guys help me if the below can be done? Please suggest if there are other options as well.
switch(x)
{
case 1:
struct_1 *name = NULL;
break;
case 2:
struct_2 *name = NULL;
break;
case 3:
struct_3 *name = NULL;
break;
default:
}
Regards