From f677e35a6a2159b523c954a2c87f39d0f04fa8ad Mon Sep 17 00:00:00 2001 From: Yurii Yakovenko Date: Mon, 11 Nov 2024 22:56:57 +0000 Subject: [PATCH] Update cv7/program.c --- cv7/program.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cv7/program.c b/cv7/program.c index 13dc55d..453347c 100644 --- a/cv7/program.c +++ b/cv7/program.c @@ -81,15 +81,21 @@ void destroy_tree(struct tree* tree){ int main(void) { - struct tree *tr; + struct tree *tr=NULL; tr=read_tree(); + printf("Expert z bufetu to vie.\n"); + if(tr==NULL) + { + printf("Chybna databaza\n"); + return 0; + } int kk; char t; kk=kkk(tr,0); - printf("Expert z bufetu to vie.\n"); + printf("Pozna %d druhov ovocia a zeleniny.\n", kk); struct tree *p=tr; @@ -134,3 +140,4 @@ int main(void) } +