hello lets say i have this code
typedef struct entry {
union {
struct A {
char *c;
} *A;
struct B {
char *c;
} *B;
} value;
} *TableEntry;
i m doing a malloc for entry and now i want to copy a string to c from struct A . do i have to allocate memory for struct A and then for c or the first malloc for table entry allocates for all of them ? thank you in advance