I have this structure
struct DIRECTORY{
char nameDir[40];
struct DIRECTORY *parent;
int numSubDir;
struct DIRECTORY *subDir[10];
};
and i allocate it with malloc.Is it possible instead of using an array
of pointers to dynamically allocate a block containing the pointers,so
that if it fills i can realloc it to bigger block?How can this be done?
i tried something like this but doesnt work:
struct DIRECTORY{
char nameDir[40];
struct DIRECTORY *parent;
int numSubDir;
int block;
struct DIRECTORY *subDir[block];
};
Thanks