Annulation.

master
Yann CHAMPEAU 3 years ago
parent 93d30ba621
commit da30f42b7a

@ -20,18 +20,19 @@ void menu(void){
printf("Choisissez votre session : ");
}
VilleIUT** loadIUT(VilleIUT** tiut, int* tlogi){
int loadIUT(VilleIUT** tiut){
FILE* f=fopen("Etudiants.bin","rb");
if(f==NULL){
perror("fopen");
exit(errno);
}
MaillonDep* m;
fread(tlogi,sizeof(int),1,f);
for(int i=0; i<*tlogi; i++){
int tlogi;
fread(&tlogi,sizeof(int),1,f);
for(int i=0; i<tlogi; i++){
fread(tiut[i]->Ville,sizeof(char),31,f);
}
for(int i=0; i<*tlogi; i++){
for(int i=0; i<tlogi; i++){
int nbIUTs;
fread(&nbIUTs,sizeof(int),1,f);
if(nbIUTs){
@ -56,7 +57,7 @@ VilleIUT** loadIUT(VilleIUT** tiut, int* tlogi){
}
}
}
return tiut[0];
return tlogi;
}
void saveIUT(VilleIUT** tiut, int tlogi){

@ -29,7 +29,7 @@ typedef struct file* File; // //
//
void menu(void); //
//
VilleIUT** loadIUT(VilleIUT** tiut, int* tlogi); //
int loadIUT(VilleIUT** tiut); //
//
void saveIUT(VilleIUT** tiut, int tlogi); //
//

@ -11,8 +11,7 @@ int main(void)
{
system("clear");
VilleIUT* tiut[36529];
int tlogi, quitter=0;
tiut=loadIUT(tiut,&tlogi);
int tlogi=loadIUT(tiut), quitter=0;
while(!quitter){
menu();
char user;

Loading…
Cancel
Save