Commit 5b9db2f38dd3534a2d41f1828efca29ec9f77566

Authored by vsalingu
1 parent ec8b615e

init dico et struct

Showing 1 changed file with 35 additions and 0 deletions   Show diff stats
@@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
  1 +#include<stdio.h>
  2 +#include <stdlib.h>
  3 +
  4 +typedef struct cell* ptcellule;
  5 +typedef struct cell* ptarbre
  6 +typedef struct cell {int lettre; ptarbre arbre; ptcellule suivant;};
  7 +
  8 +void init_dico()
  9 +{
  10 + ptarbre arbre;
  11 + arbre=NULL;
  12 +}
  13 +
  14 +void ajout_dico(ptarbre arbre, int lettre)
  15 +{
  16 + arbre=malloc(sizeof(cell));
  17 + arbre->lettre=lettre;
  18 + arbre->arbre=NULL;
  19 + arbre->suivant=NULL;
  20 +}
  21 +
  22 +
  23 +
  24 +int main()
  25 +{
  26 + init_dico();
  27 +
  28 + // Ouvrir fichier
  29 +
  30 +
  31 + while c!= EOF // lecture de tout le fichier
  32 +
  33 +
  34 + return 0;
  35 +}