Hi,
I am building a program with an index of strings (char pointers). So far I have created an array 10 char pointers using
I know that to pass an array of char pointers by value you would doCode:char *index[10]; int i; for(i=0; i<10; i++) { index[i] = malloc(20); }, but how would you do it by reference?Code:char *str[]in a function definition, and using the & operator with the array of char pointers doesn't seem to work. I know passing by value works fine but that wouldn't be desireable with large amounts of data.Code:char **str[]
Thanks
Joshun



3Likes
LinkBack URL
About LinkBacks




