Hi I have the following struct as below
I have a pointer declaredCode:typedef struct{ union{ typedef struct{ int b; }c; typedef struct{ int e; }f; }u; }a;
and a char buffer which I want to cast the struct c ontoCode:a* pter=(a*) malloc(sizeof(a));
I am not sure how to go about doing this
Or how do I access the struct c from the union?Code:pter=(a*)(c*)buffer;