From 9612fdbc1b9d2b9e12b80d552688d4d19f63ed6a Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Sun, 22 Nov 2020 13:06:22 +0100 Subject: [PATCH] buffet --- cv8/program.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cv8/program.c b/cv8/program.c index 1522de0..5f2e4a6 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -48,13 +48,12 @@ struct tree* search(struct tree* this){ this = search(this); }*/ char c = getchar(); - char buffer[50]; + /*char buffer[50]; memset(buffer, 0, 50); int x = strlen(buffer); buffer[x-1]='\0'; - memcpy(buffer, this->value, 50); - //printf("%s\n", buffer); - if(buffer[0] != '*'){ + memcpy(buffer, this->value, 50); */ + if(this != 0){ if(c == 'a'){ printf("%s\n", this->value); this = search(this->left); @@ -65,7 +64,7 @@ struct tree* search(struct tree* this){ } } - else if(buffer[0] == '*'){ + else { printf("%s\n", this->value); printf("Koniec\n"); exit(0);