This commit is contained in:
Lukian LEIZOUR 2023-11-26 22:16:14 +01:00
parent 6c8e100c6c
commit 555dcd39b7
6 changed files with 113 additions and 3 deletions

View file

@ -99,7 +99,11 @@ void menuConf(ptConf confChain, ptListener listenerChain) {
while (px -> next != NULL) {
printf("id : %d\ntitle : %s\nspeaker : %s\n", px -> id, px -> title, px -> speaker);
printf("%d/%d/%d\n\n",px -> day, px -> month, px -> year);
printf("%d/%d/%d\n",px -> day, px -> month, px -> year);
if (px -> listeners -> next != NULL ) {
printListenerList(px -> listeners);
}
printf("\n");
px = px -> next;
}
system("pause");
@ -168,7 +172,11 @@ void menuAbo(ptConf confChain, ptListener listenerChain) {
ptListener py = listenerChain;
while (py -> next != NULL) {
printf("id : %d\nname: %s\nage: %d\nlevel: %d", py -> id, py -> name, py -> age, py -> level);
printf("id : %d\nname: %s\nage: %d\nlevel: %d\n", py -> id, py -> name, py -> age, py -> level);
if (py -> confs -> next != NULL) {
printConfList(py -> confs);
}
printf("\n");
py = py -> next;
}
system("pause");
@ -198,7 +206,7 @@ void menuAbo(ptConf confChain, ptListener listenerChain) {
{
int id;
printf("Id de l'abonné à supprimer : ");
printf("Id de l'abonne à supprimer : ");
scanf("%d", &id);
removeListener(listenerChain, id);
@ -237,7 +245,17 @@ void menu(ptConf confChain, ptListener listenerChain)
break;
case 3:
{
int confId, listenerId;
printf("Entrez l'ID de la conference : ");
scanf("%d", &confId);
printf("Entrez l'ID du participant : ");
scanf("%d", &listenerId);
participateToConf(confChain, listenerChain, confId, listenerId);
menu(confChain, listenerChain);
break;
}
case 4:
break;