[an error occurred while processing this directive]
|
typedef struct {
int type_id;
type1 t1;
type2 t2;
type3 t3;
........
typeX tx;
} GSTRUCT_A;
typedef struct {
int type_id;
type1 t1;
type2 t2;
type3 t3; ........
typeY ty;
} GSTRUCT_B;
typedef struct {
int type_id;
type1 t1;
type2 t2;
type3 t3;
........
typeZ tz;}GSTRUCT_C;
void FUNC (void *type);
{
int *ptrType=(int *)type;
switch (*ptrType) {
case STRUCT_A_ID:
//...
break;
case STRUCT_B_ID:
//...
break;
case STRUCT_C_ID:
//...
break;
}
}