Store address dynamic array in c
- by user280642
I'm trying to save the address of a dynamic array index.
 struct sstor *dlist;
 struct node *q;
 q->item = &(dlist->item[(dlist->sz)-1]); // Problem?
This is my node
 struct node {
  char **item;
  struct node *next;
  struct node *prev;
 };
This is my array
 struct sstor {
  int sz;
  int maxsz;
  char item[][1024];
 };
I'm still new to pointers.  The line below gives the error: assignment from incompatible pointer type
 q->item = &(dlist->item[(dlist->sz)-1]);