Dear all,
In the function below,
how should the array of arrays data structure be defined and used?
void foo(int option)
{
int i =0;
char Colstr[3][15] = {"Red","Blue","Green"};
char Volstr[7][15] = {"1","2","3","3.5","4","4.5","5"};
char Sndstr[4][15] = {"lo","med","hi","vhi"};
int numSTrings[2] = {3,7,4};
char *arrayOfarrays[] = {Colstr,Volstr,Sndstr}; // How should this be declared?
for(i=0;i<numSTrings[option];i++)
printf("%s\n", ????); // How should arrayOfarrays be referred?
}
thanks,
shri