buffet
This commit is contained in:
parent
9693133143
commit
87a8c88581
@ -18,8 +18,8 @@ struct tree* read_tree(){
|
||||
buffer[x-1]='\0';
|
||||
|
||||
assert(r);
|
||||
if(buffer[0] != '\0'){
|
||||
|
||||
if(buffer[0] != '\0'){
|
||||
struct tree* node = calloc(1,sizeof(struct tree));
|
||||
memcpy(node->value, buffer,50);
|
||||
if(buffer[0] != '*'){
|
||||
@ -30,10 +30,11 @@ struct tree* read_tree(){
|
||||
node->right = read_tree();
|
||||
}
|
||||
}
|
||||
|
||||
//if(node->left != NULL && node->right != NULL){
|
||||
return node;
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
struct tree* search(struct tree* this){
|
||||
|
||||
@ -43,7 +44,7 @@ struct tree* search(struct tree* this){
|
||||
int x = strlen(buffer);
|
||||
buffer[x-1]='\0';
|
||||
memcpy(buffer, this->value, 50); */
|
||||
if(this != NULL){
|
||||
if(this->left != NULL && this->right != NULL){
|
||||
if(c == 'a'){
|
||||
printf("%s\n", this->value);
|
||||
this->left = search(this->left);
|
||||
|
Loading…
Reference in New Issue
Block a user