Pointer to Pointer and Pointer to Pointer to Pointer
I understand pointers much better now and even **p, ***p, ****p, etc. However, it is passing a pointer to a function such as int makeargv(... char ***argvp) and returning the address to the 3 layers of pointing.
I do not fully understand the following:
Code:
int allocstr(char **retptr)
{
char *p = "Hello";
*retptr = p;
return 1;
}
in particular why retptr = &p returns null to me and *retptr = p returns address of H.
I would love to read a detailed explanation from this forums please and help finalize my understanding of pointers and functions.
Thank you