again crash but in second for loop !!!
again crash but in second for loop !!!
Post the EXACT FULL code, and what compiler are you using?
Did you #include <string.h> ?
Last edited by Adak; 07-23-2010 at 04:15 AM.
I just copy/paste the code you gave me for tests
http://img834.imageshack.us/img834/7935/21403503.png
Dude! Get the updated version, as I mentioned previously. That's the old version.
And if someone asks for code here, they mean C code unless specified otherwise. Not assembly code .
You can either pass the number of strings(as suggested by laserlight), or end the array with NULL.Code:void Prints(char **menu) { while(*menu) { printf("%s ", *menu ); } } char *arr[ ] = { "apple","orange","foo","bar", NULL }; Prints(arr);
TY to all of you I found my mistake it was in printf where i put %s instead of it i should placed %c !!!! ARGH!!!
TNX AGAIN