I have been experimenting with pointer to pointers that point to an int. That bit I understand.
However, when I try and dereference the pointer to get the string value, the program crashes.
I am calling the function like this:
void error_msg(char **msg)
printf("**msg: %s\n", **msg); //dereference to get the string
printf("*msg: %p\n", *msg); //display the address
When I was experimenting with integers I was doing like this:
char msg_error = "Message";
char *msg = msg_error;
I guess for arrays you have to do something different.
void error_int(int **myInt)
//**myInt dereferences and *myInt displays the address
printf("*myInt address: %p value: %p\n", myInt, *myInt);
printf("**myInt address: %p value: %d\n", *myInt, **myInt);