I have a function:
int exploreDIR (char stringDIR[], char arguments[6][100])
{
/*stuff...*/
execv(filePath, arguments);
}
However, I get the warning: passing argument 2 of ‘execv’ from incompatible pointer type
If execv expects char* const argv[]
for its second argument, why do I receive this warning?
Since arrays are essentially the same thing as pointers to the start of the array, what is the critical difference here between char arguments[][]
and char* const argv[]
?