Ú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!
- BESZÁMÍTÁS! MSI GF63 Thin 10SC Gamer - i5 10500H 16GB DDR4 1TB SSD GTX 1650 4GB Max-Q W11
- Akció!!! Microsoft Surface Laptop 4 13.5" i7-1185G7 16GB 512GB 1 év garancia
- Samsung Galaxy S20 Ultra / 12/128GB / Kártyafüggetlen / 12Hó Garancia
- Berlinger Haus BH-9675 Vízforraló
- iPhone 14 128GB 100% (GARANCIÁBAN CSERÉLT)
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopszaki Kft.
Város: Budapest

