typedef struct node {
Itemtype item;
struct node *next;
} Node;
typedef struct deqstruct{
Node *front;
Node *back;
int size;
} *Deq;
void initdeq(Deq *d)
{
(*d)->size = 0;
(*d)->front = NULL;
(*d)->back = NULL;
}
does the initialization looks right to u???
it is compiled, but it got segmentation fault (core dumped) when i run it.
can any one tell me why??
Itemtype item;
struct node *next;
} Node;
typedef struct deqstruct{
Node *front;
Node *back;
int size;
} *Deq;
void initdeq(Deq *d)
{
(*d)->size = 0;
(*d)->front = NULL;
(*d)->back = NULL;
}
does the initialization looks right to u???
it is compiled, but it got segmentation fault (core dumped) when i run it.
can any one tell me why??