I have this code:
typedef struct s1{ void *x; } s1; typedef struct s2{ unsigned char y[5]; } s2; s1 *s1_g; s2 *s2_g; What I wanted to do is to point pointer x to variable y.
I tried doing this:
s1_g->x = s2_g->y but receives a segmentation error
Anyone can please enlighten me?