From 784aa50f64552f9741a2cf0fc5a05cff54a04483 Mon Sep 17 00:00:00 2001 From: Bohdan Kapliuk Date: Mon, 11 Nov 2024 14:12:21 +0200 Subject: [PATCH] cv7 --- cv7/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv7/program.c b/cv7/program.c index 64fed30..2f07889 100644 --- a/cv7/program.c +++ b/cv7/program.c @@ -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);