You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
807 B
36 lines
807 B
#include "main.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
|
|
char* lireVille(FILE* fe){
|
|
char* Ville;
|
|
fscanf("%s\t", Ville);
|
|
return Ville;
|
|
}
|
|
|
|
char* lireDept(FILE* fe){
|
|
char* Dept;
|
|
fscanf("%s\n", Dept);
|
|
return Dept;
|
|
}
|
|
|
|
ListeDept initListe(void){return NULL;}
|
|
|
|
ListeDept insertEnTete(ListeDept l, char* c){
|
|
MaillonDept *x;
|
|
x = (MaillonDept*)malloc(sizeof(MaillonDept));
|
|
if(x==NULL){printf("pb malloc"); exit;}
|
|
strcpy(x); //ligne a compléter une fois la structure Liste définie
|
|
//idem
|
|
//idem
|
|
return x;
|
|
}
|
|
|
|
ListeDept insertCroissante(ListeDept l, char* c){
|
|
if (l==NULL){return insertEnTete(l, c);}
|
|
if (strcmp()<0)//a compléter une fois la structure Liste définie
|
|
return insertEnTete(l,c);//ligne fausse, a compléter
|
|
//idem
|
|
return l;
|
|
} |