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
| noeudliste *start = new noeudliste;
noeudliste* current;
current = start;
int n = 0;
while (n < 19)
{
if (n == 18)
current->suiv = NULL;
else
current->suiv = new noeud;
current->info= n + 1;
//Creation de la sous liste
noeud* start2= new noeud;
noeud* courant2;
courant2=start2;
courant->liste_transition=courant2;
for(int b=0; b<5; b++)
{
if(b==4)
{
courant2->suiv=NULL;
}
else
courant2->suiv=new noeud;
courant2->sommet=1; //Dans mon programme cela ne faut pas 1, j'écris cela pour simplifier le comprehension
courant2=courant2->suiv;
}
current = current->suiv;
n++;
} |
Partager