arbre.c 813 Bytes
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>


typedef struct arbre{
    char val;
    char *suite[26];
    bool finmot; //1 si fin de mot
}Arbre;

typedef struct dico {
    Arbre *alpha[26];
}Dico;






void arbre_vide(struct arbre ** pt_arbre)
{
	*pt_arbre = NULL;
}

bool est_vide(struct arbre *arbre)
{
	return arbre==NULL;
}

bool fin_de_mot(struct arbre *arbre)
{
	return arbre->finmot;
}

void cons_dico(struct dico **pt_dico,char val){
    struct dico *mondico=malloc(sizeof(struct dico));
    mondico->alpha[val-97]=val; // (ascii)->a = 97
    (*pt_dico)=mondico;
}

void cons_arbre(struct arbre **pt_arbre,char val){
    struct arbre *monarbre=malloc(sizeof(struct arbre));
    mondico->alpha[val-97]=val; // (ascii)->a = 97
    
}

int main (){
    
    
    
    
    
    return 0;
}