commit
This commit is contained in:
parent
0c6cf142a4
commit
370856ec3d
9 changed files with 68 additions and 42 deletions
12
conf.c
12
conf.c
|
@ -26,20 +26,20 @@ ptConf newConfChain() {
|
|||
return confChain;
|
||||
}
|
||||
|
||||
void addConf(ptConf confChain, char title[], char speaker[], int day, int month, int year) {
|
||||
void addConf(ptConf confChain, int id, char title[], char speaker[], int day, int month, int year) {
|
||||
ptConf px = confChain;
|
||||
|
||||
while (px -> next != NULL) {
|
||||
px = px -> next;
|
||||
}
|
||||
|
||||
px -> id = findConfId(confChain);
|
||||
px -> id = id;
|
||||
px -> day = day;
|
||||
px -> month = month;
|
||||
px -> year = year;
|
||||
strcpy(px -> title, title);
|
||||
strcpy(px -> speaker, speaker);
|
||||
// ajouter le builder de liste de participants
|
||||
px -> listeners = (ptListenerList) malloc(sizeof(tListenerList));
|
||||
px -> next = (ptConf) malloc(sizeof(tConf));
|
||||
px -> next -> next = NULL;
|
||||
}
|
||||
|
@ -68,18 +68,18 @@ ptListener newListenerChain() {
|
|||
return listenerChain;
|
||||
}
|
||||
|
||||
void addListener(ptListener listenerChain, char name[], int age, int level) {
|
||||
void addListener(ptListener listenerChain, int id, char name[], int age, int level) {
|
||||
ptListener px = listenerChain;
|
||||
|
||||
while (px -> next != NULL) {
|
||||
px = px -> next;
|
||||
}
|
||||
|
||||
px -> id = findListenerId(listenerChain);
|
||||
px -> id = id;
|
||||
strcpy(px -> name, name);
|
||||
px -> age = age;
|
||||
px -> level = level;
|
||||
// ajouter la liste de conférences
|
||||
px -> confs = (ptConfList) malloc(sizeof(tConfList));
|
||||
px -> next = (ptListener) malloc(sizeof(tListener));
|
||||
px -> next -> next = NULL;
|
||||
px -> next -> prev = px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue