From 9cd93271e18936196462d93369f3f2fa3dd1f17c Mon Sep 17 00:00:00 2001 From: Kozar Date: Sun, 20 Oct 2024 12:59:11 +0000 Subject: [PATCH] Initializacia --- cv4/a_train.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index f881ba2..021890c 100644 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -23,13 +23,13 @@ struct car* add_car(struct car* first, const char* target) { } void print_train(struct car* first) { - // if(first != NULL){ - // struct car* current = first; - // while(current->next != NULL){ - // printf("%s\n", current->value); - // current = current->next; - // } - // } + if(first != NULL){ + struct car* current = first; + while(current->next != NULL){ + printf("%s\n", current->value); + current = current->next; + } + } } void cancel_train(struct car* first) {