Réglage de problèmes.

master
Yann CHAMPEAU 3 years ago
parent 73cbbd88c5
commit 925e01b25b

@ -25,13 +25,13 @@ int loadIUT(VilleIUT** tiut){
exit(errno); exit(errno);
} }
int tlogi; int tlogi;
fread(tlogi,sizeof(int),1,f); fread(&tlogi,sizeof(int),1,f);
for(int i=0; i<tlogi; i++){ for(int i=0; i<tlogi; i++){
fread(tiut[i]->Ville,sizeof(char),31,f); fread(tiut[i]->Ville,sizeof(char),31,f);
} }
for(i=0; i<tlogi; i++){ for(int i=0; i<tlogi; i++){
int nbIUTs, int nbIUTs;
fread(nbIUTs,sizeof(int),1,f); fread(&nbIUTs,sizeof(int),1,f);
if(nbIUTs){ if(nbIUTs){
tiut[i]->ldept=(MaillonDep*)malloc(sizeof(MaillonDep)); tiut[i]->ldept=(MaillonDep*)malloc(sizeof(MaillonDep));
if(tiut[i]->ldept==NULL){ if(tiut[i]->ldept==NULL){
@ -50,7 +50,7 @@ int loadIUT(VilleIUT** tiut){
perror("malloc"); perror("malloc");
exit(errno); exit(errno);
} }
m=m->suiv; m=m->suivant;
} }
} }
} }
@ -70,11 +70,11 @@ int rechercheTabPtVilleIUT(VilleIUT* tab[],int lTab,char* mot){
//Listes chainées //Listes chainées
int existe(MaillonDep* liste, char* mot){ int existe(MaillonDep* liste, char* mot){
break//A Faire ! return 1;//A Faire !
} }
int recherche(MaillonDep* liste, char* mot){ int recherche(MaillonDep* liste, char* mot){
break//A Faire ! return 1;//A Faire !
} }
//Pile //Pile

@ -9,7 +9,7 @@
int main(void) int main(void)
{ {
VilleIUT** tiut; VilleIUT* tiut[];
int tlogi=loadIUT(tiut); int tlogi=loadIUT(tiut);
menu(); menu();
char user; char user;
@ -17,7 +17,7 @@ int main(void)
switch(user){ switch(user){
case 'C': case 'C':
reset(); reset();
menuConsult(tiut,tlogi); menuUser(tiut,tlogi);
reset(); reset();
break; break;
case 'A': case 'A':

Loading…
Cancel
Save