Bonjour j'ai un souci avec mon tri de liste, quelqu un pourrai me dire ou c'est faux please
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
int my_sort_list(t_list **begin, int (*cmp)())
{
 t_list *l1;
 t_list *l2;
 void *dat;
 int verif;
 
 verif = 1;
while (verif)
{
  verif = 9;
  l2 = *begin;
    while(l2->next)
    {
      l1 = l2;
      while (l1->next && cmp(l1->data, l1->next->data) > 0)
      {
         dat = l1->data;
          l1->data = l1->next->data;
          l1->next->data = dat;
          l1 = l1->next;
          verif ++;
      }
      l2 = l2->next;
    }
 }
l2 = *begin;
}