help understanding arrays of strings!
I'd like to ask you an help to understand how to deal with arrays of strings. I don't know why but I've a mess in my mind.. :(
Every time my program has to read several strings from stdin I do something like this:
althought I'd like to declare the array of strings in this way:
printf("String #%d: ",i+1);gets(strings[i]);
which brings me to a buffer overflow..
char * strings[ROWS];
Worse, every time I have to pass such an array to a function i do this:
where the prototype of the function is for example:
This cause such a warning from the compiler:
void quickSort(char * str,int lb, int ub)
Then, I understood that I haven't clear in my mind how to deal with arrays of strings (maybe with multidimensional arrays in general) and my book (C how to program by Deitel) didn't help.
warning: passing argument 1 of ‘quickSort’ from incompatible pointer type
May you kindly suggest me any link (and excercises) to study well this topic?
Thanks a lot!