This commit is contained in:
Lukian 2023-11-12 14:59:55 +01:00
parent 244151ff0e
commit c71dcffdf6
4 changed files with 57 additions and 6 deletions

25
conf.c
View file

@ -14,5 +14,28 @@ ptDate newDate(int day, int month, int year) {
}
void printDate(ptDate date) {
printf("%d/%d/%d\n", date -> day, date -> month, date -> year);
printf("date : %d/%d/%d\n", date -> day, date -> month, date -> year);
}
ptConf newConfChain() {
ptConf confChain = (ptConf) malloc(sizeof(ptConf));
confChain -> next = NULL;
return confChain;
}
void addConf(ptConf confChainStart, char title[], char speaker[], int day, int month, int year) {
ptConf px = confChainStart;
while (px -> next != NULL) {
px = px -> next;
}
px -> date = newDate(day, month, year);
strcpy(px -> title, title);
strcpy(px -> speaker, speaker);
// ajouter le builder de liste de participants
px -> next = (ptConf) malloc(sizeof(ptConf));
px -> next -> next = NULL;
}