This commit is contained in:
Bohdan Kapliuk 2024-11-11 14:12:21 +02:00
parent 55b17326f9
commit 784aa50f64

View File

@ -10,7 +10,7 @@ struct tree {
struct tree* right;
};
struct tree* read_tree(int* counter){
struct tree* read_tree(int counter){
char buffer[SIZE];
memset(buffer, 0, SIZE);
char* r = fgets(buffer, SIZE, stdin);
@ -23,7 +23,7 @@ struct tree* read_tree(int* counter){
strcpy(tree->value,r);
assert(tree->value);
if (buffer[0] == '*') {
(*counter)++;
counter++;
return tree;
}
tree->left = read_tree(counter);