Facebook
From Mariusz, 5 Years ago, written in C.
Embed
Download Paste or View Raw
Hits: 208
  1. struct liga *dodaj_Lige(L * lista, char nazwa1)
  2. {
  3.        
  4.         if (lista == NULL)
  5.         {     //opcja gdyby nie bylo
  6.                 L * a = malloc(sizeof(L));
  7.                 a->nazwa = nazwa1;
  8.                 return;
  9.         }
  10.         L* lista1 = lista;
  11.         while (lista1->next != NULL)   //dodanie lig do istniejacych
  12.         {
  13.                 lista1 = lista1->next;
  14.         }
  15. //      lista1 = lista1->next;
  16.         L* lista1 = malloc(sizeof(L));
  17.         lista1->nazwa = nazwa1;
  18. }