whats wrong with this?
Code:void function(char *stuff[]) { for(int i = 0; i < NUMBER; i++) printf("%s\n", stuff[i]); }
whats wrong with this?
Code:void function(char *stuff[]) { for(int i = 0; i < NUMBER; i++) printf("%s\n", stuff[i]); }
The same loop output fine in my main function, so I think I must be doing something wrong with the string pointer.
I am getting a segmentation fault every time I use stuff[] any where in that function???
It works fine for me, perhaps you could post more code such as where you declare and fill the array of pointers and where you call the function.
-Prelude
My best code is written with the delete key.