Datatype declaration significance in pointer to pointer (C/C++)
c, c++, memory, pointers
Solution
Why should we use `void**` when you want a pointer to a `char *`? Why should we not use `char **`?
With `char **`, you have type safety. If the pointer is correctly initialized and not null, you know that by dereferencing it once you get a valid `char *` - and by dereferencing that pointer, in turn, you get a `char`.
Why should you ignore this advantage in type safety, and instead play pointer Russian roulette with `void**`?
Problem
Is there a difference between pointer to integer-pointer (`int**`) and pointer to character-pointer (`char**`), and any other case of pointer to pointer? Isn't the memory block size for any pointer is the same, so the sub-datatype doesn't play a role in here? Is it just a semantic distinction with no other significance? Why not to use just `void**`?