From 6179afeebe400bca2df7fecfc5a1ee3055c39909 Mon Sep 17 00:00:00 2001 From: Yurii Yakovenko Date: Wed, 23 Oct 2024 19:37:45 +0000 Subject: [PATCH] Update cv4/a_train.c --- cv4/a_train.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index df08cb0..5590ad3 100644 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -1,12 +1,8 @@ #include -#define SIZE 50 +#include"a_train.h" + -struct car -{ - char value[SIZE]; // Cieľová stanica - struct car* next; // Ďaľší záznam, môže byť NULL -}; struct car* add_car(struct car* first,const char* target) { @@ -94,18 +90,6 @@ struct car* clear_train(struct car* first, const char* target) return first; } -int main() - { - struct car* train = NULL; - train = add_car(train,"Presov"); - train = add_car(train,"Bratislava"); - train = add_car(train,"Levoca"); - train = add_car(train,"Spiska Nova Ves"); - print_train(train); - clear_train(train,"Levoca"); - print_train(train); - cancel_train(train); - return 0; -} +