This commit is contained in:
Maryna Kravtsova 2020-11-22 13:06:22 +01:00
parent 236d1063a3
commit 9612fdbc1b

View File

@ -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);