I want to get char* array as parameter in C function. I using by this code:
void func(char* str, char *res[])
{
res[0]=strstr(str,"str");
....
}
int main()
{
char *res[6];
func(str,res);
...
}
As far as I know, array sent to function as pointer, so I don't know why I get an compilation error:
Argument of type char(*)[6] is incompatible with parameter of type char**
How should I correct my code?