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 30 31 32 33
| int main()
{
/* notre liste bientot chainée ! */
list maListe = {0};
/* On ajoute quelques elements */
ajouter(&maListe,1);
ajouter(&maListe,2);
ajouter(&maListe,3);
/* On affiche */
printf("Avant :\n");
afficher(&maListe);
/* On le retire */
printf("On retire 2 :\n");
retirer(&maListe,2);
/* On affiche */
afficher(&maListe);
printf("On retire 3 :\n");
retirer(&maListe,3);
/* On affiche */
afficher(&maListe);
printf("On retire 1 :\n");
retirer(&maListe,1);
/* On affiche */
afficher(&maListe);
system("Pause");
return 0;
} |