So this is a simple assignment that works pretty well:
int **a = malloc(sizeof(int*));
int *b;
a[0] = b;
But when I try to do the same inside a struct via a pointer to struct:
typedef struct jojo
{
int **a ;
}jojo;
Lets say I allocate for a pointer to jojo called alpha a lot of space like for 100 integers...
jojo *alpha = malloc(sizeof(int)*100);
int *b;
alpha->a[0] = b;
Here there is a segmentation fault. I am completely lost, so I am asking for help. Thanks.