Are these declarations different or do the produce the same result?
char * const *argv;
and
const char **argv;
Is there a difference or are both pointer to a pointer?
The background is that I was writing a C commandline shell and used this struct for a command:
struct command
{
char * const *argv;
};
The above struct was used to call exec
. Now when I looked at another question then the struct was different:
Connecting n commands with pipes in a shell?
In that question the struct to achieve the same is different.