buffet
This commit is contained in:
parent
236d1063a3
commit
9612fdbc1b
@ -48,13 +48,12 @@ struct tree* search(struct tree* this){
|
|||||||
this = search(this);
|
this = search(this);
|
||||||
}*/
|
}*/
|
||||||
char c = getchar();
|
char c = getchar();
|
||||||
char buffer[50];
|
/*char buffer[50];
|
||||||
memset(buffer, 0, 50);
|
memset(buffer, 0, 50);
|
||||||
int x = strlen(buffer);
|
int x = strlen(buffer);
|
||||||
buffer[x-1]='\0';
|
buffer[x-1]='\0';
|
||||||
memcpy(buffer, this->value, 50);
|
memcpy(buffer, this->value, 50); */
|
||||||
//printf("%s\n", buffer);
|
if(this != 0){
|
||||||
if(buffer[0] != '*'){
|
|
||||||
if(c == 'a'){
|
if(c == 'a'){
|
||||||
printf("%s\n", this->value);
|
printf("%s\n", this->value);
|
||||||
this = search(this->left);
|
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("%s\n", this->value);
|
||||||
printf("Koniec\n");
|
printf("Koniec\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user