I have a code which does more or less:
bar(const char**)
{
// stuff
}
foo(char** arr)
{
bar(arr);
}
The compiler notifies me that i am doing an invalid conversion from ‘char**’ to ‘const char**’
. While I know what it means, I fail to understand why is it not allowed. It is perfectly ok to pass char*
where const char*
is needed.