Kayo Hisatomi <[EMAIL PROTECTED]> wrote: Hi Roberto,
The problem is in this line in the main() function: char *s0 = " bye 1 "; You are not allocating memory for the string, but just for the pointer. So, try this: char s0[] = " bye 1 "; And the program will work. Regards, Kayo. ----- Original Message ---- From: Roberto To: [email protected] Sent: Wednesday, April 11, 2007 10:44:50 AM Subject: [c-prog] Segmentation fault in a simple function. <del> int main (char **argz, char argc) ^^^^^^^^^^^^^^ looks funny to me. Isn't it supposed to be: int main (int argc, char** argv) Or is this ok in older C? Regards, Mohan S N --------------------------------- Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. [Non-text portions of this message have been removed]
