I was wondering if anyone can give me an answer to this:
Here is the code
int main(int argv, char *argc)
char *tempstring = "this string"
name = (char**)malloc(sizeof(char**) * NoOfInFiles))
name[i] = strdup(tempstring);
// Do other stuff
ok now my question is this:
If the memory for name is freed, will it free the memory that has been allocted by strdup() or will that memory still be set aside?
The way I think it works is that I would have to do this first :
before freeing name? is this right or am I just messed up?
And the pointer to pointer has to stay. It is too deep in the original code to remove it.
any help would be appreciated