diff --git a/data/listeners b/data/listeners index fabd967..d2f1a19 100644 --- a/data/listeners +++ b/data/listeners @@ -1,5 +1,4 @@ 1,Simon,21,3 -2,Bertrand,42,8 3,Thomas,20,3 4,Victor,19,2 5,Lukian,19,2 @@ -13,9 +12,8 @@ 13,Chayma,22,5 14,Elisa,23,5 15,Erwan,19,2 -16,Juliette,32,8 -17,Malick,25,7 18,Marion,17,1 19,Tom,17,1 20,Sebastien,45,5 21,Jean,50,5 +22,Patrick,15,5 diff --git a/data/relations b/data/relations index 423a92f..17d29d8 100644 --- a/data/relations +++ b/data/relations @@ -3,3 +3,4 @@ 3:12;0,1;4 4:12;0,1;4 9:20;5 +10:21;5 diff --git a/dataBackup/listeners b/dataBackup/listeners index fabd967..d2f1a19 100644 --- a/dataBackup/listeners +++ b/dataBackup/listeners @@ -1,5 +1,4 @@ 1,Simon,21,3 -2,Bertrand,42,8 3,Thomas,20,3 4,Victor,19,2 5,Lukian,19,2 @@ -13,9 +12,8 @@ 13,Chayma,22,5 14,Elisa,23,5 15,Erwan,19,2 -16,Juliette,32,8 -17,Malick,25,7 18,Marion,17,1 19,Tom,17,1 20,Sebastien,45,5 21,Jean,50,5 +22,Patrick,15,5 diff --git a/dataBackup/relations b/dataBackup/relations index 423a92f..17d29d8 100644 --- a/dataBackup/relations +++ b/dataBackup/relations @@ -3,3 +3,4 @@ 3:12;0,1;4 4:12;0,1;4 9:20;5 +10:21;5 diff --git a/main.exe b/main.exe index b3053ca..8fc8b69 100644 Binary files a/main.exe and b/main.exe differ diff --git a/singleFile.c b/singleFile.c index 494561a..2a6f509 100644 --- a/singleFile.c +++ b/singleFile.c @@ -683,7 +683,7 @@ void menuConf(ptConf confChain, ptListener listenerChain) printf("Id : %d\nTitre : %s\nConferencier : %s\n", px->id, px->title, px->speaker); printf("Date : %d/%d/%d\n", px->day, px->month, px->year); printf("Nombre de participants : %d\n", confParticipations(px)); - if (px->listeners->next != NULL) + if (px->listeners->next->next != NULL) { printListenerList(px->listeners->next); } @@ -750,6 +750,16 @@ void menuConf(ptConf confChain, ptListener listenerChain) case 4: { + ptConf px = confChain->next; + + printf("\n"); + while (px->next != NULL) + { + printf("%s : %d/%d/%d\n", px->title, px->day, px->month, px->year); + px = px->next; + } + printf("\n"); + int day, month, year, time; printf("Jour : "); scanf("%d", &day); @@ -760,7 +770,7 @@ void menuConf(ptConf confChain, ptListener listenerChain) time = day + 31 * month + 365 * year; - ptConf px = confChain; + px = confChain; while (px->next != NULL) { @@ -781,7 +791,7 @@ void menuConf(ptConf confChain, ptListener listenerChain) } saveConf(confChain->next); - + saveRelations(confChain->next); menuConf(confChain, listenerChain); } @@ -815,7 +825,7 @@ void menuAbo(ptConf confChain, ptListener listenerChain) while (py->next != NULL) { printf("Id : %d\nNom: %s\nAge: %d\nNiveau: %d\n", py->id, py->name, py->age, py->level); - if (py->confs->next != NULL) + if (py->confs->next->next != NULL) { printConfList(py->confs->next); } @@ -951,7 +961,7 @@ void menu(ptConf confChain, ptListener listenerChain) case 4: { - ptConf px = confChain; + ptConf px = confChain -> next; int max = confGradeAvg(px); ptConf confMax = px; @@ -967,7 +977,7 @@ void menu(ptConf confChain, ptListener listenerChain) px = px->next; } - printf("La conférence la mieux notee est : %s\n\n", confMax->title); + printf("La conference la mieux notee est : %s\n\n", confMax->title); system("pause"); menu(confChain, listenerChain);