The issue is this. I want to be able to create my argv using array notation:
char myargv[10][30];
however main functions expect **char despite being able to treat them the same logically Ex:
int main(int argc, char **argv)
{
printf("%s\n",argv[0]);
return 0;
}
However trying the following inside my code wont work:
char myargv[10][30];
char **pargv = myargv;
Can somebody clarify? I have also tried some other permutations like, pargv = myargv[0][0] etc, with no success.
EDIT: If this proves to be impossible the way I've outlined can someone help me initialize char **myargv using a malloc call so that it has the 10 strings of 40 characters. Im having trouble getting the syntax right.