Initializacia

This commit is contained in:
Anton 2024-11-10 16:08:07 +01:00
parent 28eee6e2c0
commit 13efda128e
2 changed files with 18 additions and 0 deletions

BIN
cv7/main Executable file

Binary file not shown.

View File

@ -63,3 +63,21 @@ void count_items(struct tree* tree, int* count){
}
}
int main() {
printf("Nacitanie baze pravidiel:\n");
struct tree* root = load_tree();
if (!root) {
printf("Chyba: Nepodarilo sa nacitat bazu pravidiel.\n");
return 1;
}
int count = 0;
count_items(root, &count);
printf("Pozna %d druhov ovocia a zeleniny.\n", count);
printf("Strom pre ladenie:\n");
print_tree(root, 0);
destroy_tree(root);
return 0;
}