pointer to pointer realloc problem
hi everyone,
i have another problem with realloc with a pointer to a pointer,
here is the code:
Code:
typedef struct posPoolspace{
char **posList;
int listSize;
}posPool;
typedef struct trieCDT {
posPool *pool;
}trieCDT;
typedef struct trieCDT *Trie;
later in my code i did like this to realloc
Code:
char *plist=*(trie->pool->posList);
plist =realloc(plist,(trie->pool->listSize+1)*sizeof(100));
strcpy(plist+trie->pool->listSize,val);
i get Segmentation Fault .. what am i doing worng??