From b02c3d5fafd6c454dbb3cf888fa0ff3f9f6cb37c Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Sun, 22 Nov 2020 18:22:37 +0100 Subject: [PATCH] buffet --- cv8/program.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cv8/program.c b/cv8/program.c index 4d2710a..0157c19 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -11,7 +11,10 @@ struct tree { struct tree* read_tree(int* counter){ + + int* c = counter; + printf("%d\n", *c); char buffer[50]; memset(buffer,0,50); char* r = fgets(buffer,50,stdin); @@ -156,7 +159,7 @@ int main(){ printf("Expert z bufetu to vie.\n"); struct tree* tree = NULL; - int counter; + int counter = 0; tree = read_tree(&counter); int count = count_leaves(tree);