error: dereferencing pointer to incomplete type
The problem line is "gl->point[0] = (struct list *)&foo;"
I read somewhere that I could be storing a declaration. If that is the case I need that explained to me.
struct ref {
char **name;
struct list **point;
};
int main ( ) {
typedef struct {
char **name;
struct list **point;
} temp;
struct ref *gl;
gl->name = malloc ( 1024 * sizeof(char *) );
gl->name[0] = "A";
temp foo;
foo.name = malloc ( 1024 * sizeof(char *) );
foo.name[0] = "B";
gl->point[0] = (struct list *)&foo;
printf ( "!%s!\n" , gl->point[0]->name[0] );
}