--- In [email protected], "Ahmed Shabana" <[EMAIL PROTECTED]> wrote: > > struct maiN s0; > strcpy(s0.s1->name,"hi man "); > but when run get segmentation fault
You haven't initialised s0, so s1 could be pointing anywhere.
--- In [email protected], "Ahmed Shabana" <[EMAIL PROTECTED]> wrote: > > struct maiN s0; > strcpy(s0.s1->name,"hi man "); > but when run get segmentation fault
You haven't initialised s0, so s1 could be pointing anywhere.