conf-database/main.c
2023-11-20 10:24:31 +01:00

34 lines
785 B
C

#include <stdlib.h>
#include <stdio.h>
#include "conf.h"
#include "screenManager.h"
int main()
{
ptConf confChain = newConfChain();
ptListener listenerChain = newListenerChain();
addConf(confChain, "test", "tesst", 21, 120, 2023);
addConf(confChain, "test", "tesst", 21, 120, 2023);
addConf(confChain, "test", "tesst", 21, 120, 2023);
addListener(listenerChain, "Roger", 19, 4);
ptConf px = confChain;
ptListener py = listenerChain;
while (px -> next != NULL) {
printf("title : %s\nspeaker : %s\n", px -> title, px -> speaker);
printf("%d/%d/%d\n", px -> day, px -> month, px -> year);
px = px -> next;
}
while (py -> next != NULL) {
printf("name: %s\nage: %d\nlevel: %d", py -> name, py -> age, py -> level);
py = py -> next;
}
//menu();
return 0;
}