Skip to content
Snippets Groups Projects
Commit 343db3f1 authored by Alec's avatar Alec
Browse files

main program bugfix

parent e14b25ba
Branches
Tags
No related merge requests found
...@@ -6,7 +6,7 @@ int main() { ...@@ -6,7 +6,7 @@ int main() {
node *tree = bp_create_node(); node *tree = bp_create_node();
date test = {.day = 26, .month = 5, .year = 101}; date test = {.day = 26, .month = 5, .year = 101};
entry person; entry person;
/*
strcpy(person.f_name, "Alec\0"); strcpy(person.f_name, "Alec\0");
strcpy(person.l_name, "Schmidt\0"); strcpy(person.l_name, "Schmidt\0");
strcpy(person.phone, "0789444425\0"); strcpy(person.phone, "0789444425\0");
...@@ -40,7 +40,7 @@ int main() { ...@@ -40,7 +40,7 @@ int main() {
test.year = 97; test.year = 97;
person.birth = test; person.birth = test;
tree = bp_insert_val(tree, person); tree = bp_insert_val(tree, person);
*/
int quit = 0; int quit = 0;
while (!quit) { while (!quit) {
...@@ -54,11 +54,10 @@ int main() { ...@@ -54,11 +54,10 @@ int main() {
"p - Print l'arbre dans son état actuel\n" "p - Print l'arbre dans son état actuel\n"
"==================================\n"); "==================================\n");
char select; char select[2];
scanf("%c", &select); scanf("%s", select);
// printf("%c\n", select);
switch (select) { switch (select[0]) {
case 'a': case 'a':
START: START:
printf("Veuillez enter le nom de famille :\n"); printf("Veuillez enter le nom de famille :\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment