cv7
This commit is contained in:
parent
55b17326f9
commit
784aa50f64
@ -10,7 +10,7 @@ struct tree {
|
|||||||
struct tree* right;
|
struct tree* right;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tree* read_tree(int* counter){
|
struct tree* read_tree(int counter){
|
||||||
char buffer[SIZE];
|
char buffer[SIZE];
|
||||||
memset(buffer, 0, SIZE);
|
memset(buffer, 0, SIZE);
|
||||||
char* r = fgets(buffer, SIZE, stdin);
|
char* r = fgets(buffer, SIZE, stdin);
|
||||||
@ -23,7 +23,7 @@ struct tree* read_tree(int* counter){
|
|||||||
strcpy(tree->value,r);
|
strcpy(tree->value,r);
|
||||||
assert(tree->value);
|
assert(tree->value);
|
||||||
if (buffer[0] == '*') {
|
if (buffer[0] == '*') {
|
||||||
(*counter)++;
|
counter++;
|
||||||
return tree;
|
return tree;
|
||||||
}
|
}
|
||||||
tree->left = read_tree(counter);
|
tree->left = read_tree(counter);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user