Hirdetés
Új hozzászólás Aktív témák
-
Gyuri16
senior tag
válasz
!wannabe
#2128
üzenetére
az add fuggvenyedben van a hiba a
end->next = new;
sornal. az elso elem hozzaadasanal az end NULL, ezert a segfault.valami ilyet javaslok:
void add( struct node *new ) /* adding to end of list */
{
if( head == NULL ) /* if there are no nodes in list, then */
head = new; /* set head to this new node */
if (end != NULL) // megnezzuk van e mar utolso elem
end->next = new; /* link in the new node to the end of the list */
new->next = NULL; /* set next field to signify the end of list */
end = new; /* adjust end to point to the last node */
}
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- Telefon felvásárlás!! iPhone 16/iPhone 16 Plus/iPhone 16 Pro/iPhone 16 Pro Max
- Samsung Galaxy Ring 12mm, 1 Év Garanciával
- ÁRGARANCIA!Épített KomPhone Ryzen 7 5700X 32/64GB RAM RTX 5060 Ti 8GB GAMER PC termékbeszámítással
- Apple iPhone 13 ProMax 256GB Kártyafüggetlen 1év Garanciával
- Apple iPhone 7 / 128GB / Kártyafüggetlen / 12Hó Garancia / akku :84%
Állásajánlatok
Cég: Laptopszaki Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


