|
From: Lucas B. <bra...@re...> - 2004-09-22 14:58:29
|
Hi Naveen: > You are allocating enough memory here only for one > pointer(i.e LinkedList*) and not for the entire > structure. Thats why the write to s->key (which is of > type char * and occupies size = pointer size) is ok > but all other writes are invalid. > Needs to be changed to > > s = (LinkedList *)malloc (sizeof( LinkedList )); > Oooops... my mistake :) Thanks a lot. I'd also like to thanks everybody whom also answered (Andreas, Ashley and Jiafu). -- []'s Lucas Brasilino bra...@re... http://www.recife.pe.gov.br Emprel - Empresa Municipal de Informatica (pt_BR) Municipal Computing Enterprise (en_US) Recife - Pernambuco - Brasil Fone: +55-81-34167078 |