how to get structure values inside another structure via union ?

c
data-structure
function
malloc
memory

#1

i created 3 structure and one union and allocted some meory for these strucutres . i can’t get the values from these structures .

typedef struct { char *type; }tourist;

typdef struct { int name; }metr;

typedef union { metr m1; tourist t1; }both;

typdef structure { char *name; char *country; both both1; }place;

in main pgm :

void main() { place *pla[5]; tourist *tou[5]; update(&pla[index],cityname,countryname,&tou[index]); }

void update(place **ptr,char *na,char *co,tourist **tor) { strcpy((*ptr)->both1.tourist1.(*tor)->type,tourtype); }

Already allocated memory for 2 structures place and tourist. Is this correct to call a value from structure (*ptr)->both1.t1.(*tor)->type