Actualiser Listechaînes.c
This commit is contained in:
parent
07ec929fc4
commit
1e37bf2fb3
@ -0,0 +1,16 @@
|
|||||||
|
Liste *initialisation()
|
||||||
|
{
|
||||||
|
Liste *liste = malloc(sizeof(*liste));
|
||||||
|
Element *element = malloc(sizeof(*element));
|
||||||
|
|
||||||
|
if (liste == NULL || element == NULL)
|
||||||
|
{
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
element->nombre = 0;
|
||||||
|
element->suivant = NULL;
|
||||||
|
liste->premier = element;
|
||||||
|
|
||||||
|
return liste;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user