Bonjour svp j'ai problème sur les pile, en fait j'ai écrit la fonction empiler, dépiler ...
mais le problème quand j’exécute le programme il m'affiche juste "LA PILE EST VIDE" aidé moi svp

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
 
 
#include<stdio.h>
#include<stdlib.h>
 
typedef enum {
 
 true, false
 
} bool;
 
typedef struct pileElement {
 
 int value;
 
struct pileElement *suivant;
} pileElement , *pile ;
 
//------------------CREATION D'UNE PILE-------------------
 
pile creerPile(void)
{
   return NULL;
}
 
//-----------------TESTE SI UNE PILE EST VIDE-------------
 
bool estVide(pile pl)
{
	if (pl == NULL)
 
	return true;
 
	return false;
}
 
//----------------EMPILER--------------------------------
 
pile empiler(pile pl, int x)
{
  pileElement *nouveau;
 nouveau = (pileElement*)malloc(sizeof(struct pileElement));
 
   nouveau->value = x;
 
   nouveau->suivant = pl;
 
 
}
 
//-----------------DEPILER------------------------------
 
int  depiler(pile pl)
{
	pile *nouveau;
 
	if(pl == NULL)
	{
 		puts("LA PILE EST VIDE\n");
		return;
	}
 
  pl = pl->suivant;
  free(pl);
 
 
}
 
//---------------AFFICHAGE D'UNE PILE-------------------
 
void afficherPile(pile pl)
{
 
	if(pl == NULL)
	{
		puts("LA PILE EST VIDE\n");
 
	}
 
  while(pl != NULL)
   {
 
     printf(" [%d]\n", pl->value);
	pl = pl->suivant;
 }
}
 
//---------------------LA FONCTION MAIN------------------
 
int main(void)
{
 
  pile maPile;
 
  maPile = creerPile();
  maPile = empiler(maPile , 14);
  maPile = empiler(maPile , 125);
  maPile = empiler(maPile , 45);
 
  afficherPile(maPile);
 
}