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) } +