My question ist
void function (const char **params)
{
const char *para;
para = ¶ms[0]; //1
para = params; //2
para = *¶ms; //3
}
all 3 options will be compiled by Netbeans gdb but gcc says sth like assignment from incompatible pointer type.
Why is this differnce …. got gcc 4.6.1 and what can I do in gcc to point to the value of **params with *para
In all three cases, the type of the right-hand side is
const char **, which cannot be assigned to aconst char *without a cast.All compilers should warn you about this if you turn their warning level up high enough.
It’s not clear what you want to do; if you want to point at the beginning of the first sub-array, then this would work: