Initializacia
This commit is contained in:
parent
cc577a088c
commit
3f87d9c6ac
@ -9,9 +9,8 @@ void test_station(struct station* station) {
|
|||||||
char station_name[MAX_INPUT];
|
char station_name[MAX_INPUT];
|
||||||
int capacity;
|
int capacity;
|
||||||
|
|
||||||
printf("Enter station name and capacity (or 'exit' to stop):\n");
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
printf("Enter station name and capacity (or 'exit' to stop):\n");
|
||||||
printf("Station name: ");
|
printf("Station name: ");
|
||||||
if (!fgets(station_name, MAX_INPUT, stdin)) break;
|
if (!fgets(station_name, MAX_INPUT, stdin)) break;
|
||||||
|
|
||||||
|
BIN
cv6/station
BIN
cv6/station
Binary file not shown.
@ -32,7 +32,7 @@ struct tree* load_tree() {
|
|||||||
node->left = load_tree();
|
node->left = load_tree();
|
||||||
node->right = load_tree();
|
node->right = load_tree();
|
||||||
} else if (node->left != NULL || node->right != NULL) {
|
} else if (node->left != NULL || node->right != NULL) {
|
||||||
printf("Expert z bufetu to vie.\n");
|
printf("Chybna databaza\n");
|
||||||
free(node);
|
free(node);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -106,4 +106,4 @@ int main() {
|
|||||||
|
|
||||||
destroy_tree(root);
|
destroy_tree(root);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user