How can I call a function which takes an argument like this
void func(char *inout[]);
This works okay:
char *pOutPut[500];
for(int i = 0; i < 10; i++)
{
pOutPut[i] = (char*) malloc(33);
}
func(pOutPut);
But if I don't want to use dynamic memory
char pout[10][33];
func(pout); // Compiler error !
func(char **)pout); // exception!
void func(char *inout[]);
This works okay:
char *pOutPut[500];
for(int i = 0; i < 10; i++)
{
pOutPut[i] = (char*) malloc(33);
}
func(pOutPut);
But if I don't want to use dynamic memory
char pout[10][33];
func(pout); // Compiler error !
func(char **)pout); // exception!
Comment