The application of const to the function James()'s argument works as I expect, but it doesn't for James2(). I get the following compiler warning.
1 2
...main.c(281,1): passing argument 1 of 'James2' from incompatible pointer type
...main.c(247,1): expected 'const char **' but argument is of type 'char **'
Anyone know why I can't apply the const in the second case without a cast?
&test is a char** not a charconst**. I don't know if there is a good reason why there can't be an implicit conversion in this case.
If you change test to charconst* (which it should be because it is pointing to const data) &test will become the correct type and compile as it should.