Hello,
I am dynamically building an array of strings. I have defined a pointer to pointer of char (char** MyPointer). To build the array I'm using the realloc-function for both dimensions of the array. This all works well until I want to "delete" the array for a new sequence. For this, I posted the following command:
MyPointer = realloc (MyPointer, 0);
The pointer is set to NULL after this. Now, I want to build the array again and this does not work! I'm not able to allocate more than one char* for the char** MyPointer. I also tried to free the char**, then use malloc and realloc, this doesn't work as well.
I have attached the functions that I'm using to build, rebuild and delete the array.