Feb 3, 2011 at 9:31pm UTC
"An error" is not a sufficient description of the problem...
run the debugger, check which line causes the error and why it is caused (by checking the value of the relevant variables).
Feb 3, 2011 at 9:50pm UTC
Why the ampersand? As head is a pointer to a lista object, you could have just passed head as it was and the types would match up perfectly.
-Albatross
Last edited on Feb 3, 2011 at 9:50pm UTC
Feb 3, 2011 at 9:59pm UTC
ok. I have a question. How to insert numbers 1-5 to a list?
Feb 3, 2011 at 10:14pm UTC
a wanted to delete a data that choose. Is that correct?
1 2 3 4 5 6 7 8 9
void delete (int element)
{wsk=first;
while (wsk->nast != NULL)
{ if (wsk->nast->wartosc == element)
{ lista *usuwany=wsk->nast;
wsk->nast = usuwany->nast;
free(usuwany); }
else { wsk = wsk->nast; } } }
Last edited on Feb 3, 2011 at 10:14pm UTC