Commit 075f46e2d5793de5bf4904a68419d1d50d23072f
1 parent
f325dd23
affichage et correction de bug
Showing
1 changed file
with
23 additions
and
1 deletions
Show diff stats
arbre.c
@@ -82,12 +82,34 @@ void charger_arbre(FILE *fp, struct dico **pt_dico) | @@ -82,12 +82,34 @@ void charger_arbre(FILE *fp, struct dico **pt_dico) | ||
82 | return ; | 82 | return ; |
83 | } | 83 | } |
84 | 84 | ||
85 | +void free_arbre(struct dico **pt_dico){ | ||
86 | + if (*pt_dico-> | ||
85 | 87 | ||
88 | +} | ||
86 | 89 | ||
90 | +void affiche_dico(struct dico *dico){ | ||
91 | + if(dico==NULL){ | ||
92 | + return ; | ||
93 | + } | ||
94 | + for(int i=0;i<26;i++){ | ||
95 | + affiche_arbre(dico->alpha[i]); | ||
96 | + } | ||
97 | +} | ||
98 | + | ||
99 | +void affiche_arbre(struct arbre *arbre){ | ||
100 | + if(arbre==NULL){ | ||
101 | + return ; | ||
102 | + } | ||
103 | + printf("%c\n",arbre->val); | ||
104 | + for(int i=0;i<26;i++){ | ||
105 | + affiche_arbre(arbre->suite[i]); | ||
106 | + } | ||
107 | +} | ||
87 | 108 | ||
88 | 109 | ||
89 | int main (){ | 110 | int main (){ |
90 | - | 111 | + Dico *mondico=malloc(sizeof(struct dico)); |
112 | + charger_arbre("dicotest.txt",mondico); | ||
91 | 113 | ||
92 | 114 | ||
93 | 115 |