I have a struct like this:
typedef struct stringd{
char **x;
}s;
and a two dimensional char array declared as
char *c[32];
I am filling up the char array inside a loop and at the end passing it to the struct *s. What would be the right way of doing this?
s->x = &c;
or
s->x = c;
both do not seem to work.
Works for me. Why exactly doesn’t it work? What is the error message? Maybe you have confused
typedef s, which is a type, and variables?